From nobody Wed Oct 05 08:07:47 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mj6dZ129jz4dfTr for ; Wed, 5 Oct 2022 08:08:18 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mj6dY2C6pz43Tm for ; Wed, 5 Oct 2022 08:08:16 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 489925C00F1 for ; Wed, 5 Oct 2022 04:08:16 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Wed, 05 Oct 2022 04:08:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1664957296; x=1665043696; bh=gJ0s5cmJgaMGqbiYPevOYEvWxLLcPaipofS m0HImSHE=; b=GznWrvk0nKuEQ/ZAH2WCHmzgqbhOk+Bd4ocKDofLdajvnl/ZJC3 3Cy/NwERHtWdgRuDrCHtbPW0dSD0jHzZPbRlCHg7g75LntGkPBcCBThsg9l3hB1A EtxVCO8Tr/pp7rhVCN0uL9d6fuajXURiNHS/IY9r1KF178Oy9OSQVguTfDm/Bupc 5tvmrv14Dd++fVQfePL32v2I9/s8CjY1W+EZ4h9ahyus1idP/Yqon/4w/1uldIQm gnxcfT3Ew/hzU8O5qVyF2wX0nrsMCxNscHcGy80vcNEctuX/5Ok+9qUyQNNMrSOS xilOJa0v5ndjBvR/ArJTO3B5d2gjxE3dQvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1664957296; x= 1665043696; bh=gJ0s5cmJgaMGqbiYPevOYEvWxLLcPaipofSm0HImSHE=; b=c Mhc1c3sPBlyUFpb0UuCuzJPLZAcyd9jbeHyOHqjPVW+c7GXOmDfjyMhGOpNmdtYG H5pSFAM65lcSXlB3Yrab7Lv/2x9aGu+LHRYaMICVc7bGvaGRSYmUgR0UE9zelFsq KgtKs57t2DD70pWebWaYoB7ONnWSQR0EEYTA45xycrfCEFjeK+EEkaNvX//EFzdR 3nbhf2D6fPaUGXdV1UmMb+Vpv5ovxUhY2xcahnsfDNGRXRij/W74Cgz1x45gg8Et TIKN2N0OgJqpgysDQ8/WfhQBTICVqSSjs/B1QrVms69oE/v6WfA+9Cy16ECMWZrO Yux1b06PV3Z+MRAoaH7DA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeivddguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdffrghvvgcuvehothhtlhgvhhhusggvrhdfuceouggthhes shhkuhhnkhifvghrkhhsrdgrtheqnecuggftrfgrthhtvghrnhepudduiedttdegfefhie ejgfehieeijeevtefgtdevtefgueetueeuieffleeludfhnecuffhomhgrihhnpehfrhgv vggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepuggthhesshhkuhhnkhifvghrkhhsrdgrth X-ME-Proxy: Feedback-ID: ic0e84090:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 11E2C36A0075; Wed, 5 Oct 2022 04:08:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1015-gaf7d526680-fm-20220929.001-gaf7d5266 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 Message-Id: Date: Wed, 05 Oct 2022 08:07:47 +0000 From: "Dave Cottlehuber" To: freebsd-net Subject: PR241792 dhclient trivial fix + MFC request Content-Type: text/plain X-Rspamd-Queue-Id: 4Mj6dY2C6pz43Tm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=skunkwerks.at header.s=fm3 header.b=GznWrvk0; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="c Mhc1c3"; dmarc=none; spf=pass (mx1.freebsd.org: domain of dch@skunkwerks.at designates 66.111.4.29 as permitted sender) smtp.mailfrom=dch@skunkwerks.at X-Spamd-Result: default: False [-4.09 / 15.00]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[skunkwerks.at:s=fm3,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.29:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[skunkwerks.at:+,messagingengine.com:+]; FREEFALL_USER(0.00)[dch]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[skunkwerks.at]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; ARC_NA(0.00)[] X-ThisMailContainsUnwantedMimeParts: N TLDR cloud providers expect FreeBSD to behave like linux, and assign a default interface route to a /32 lease. Without this, images start up without a default interface. Very inconvenient. Index: sbin/dhclient/dhclient-script =================================================================== --- sbin/dhclient/dhclient-script (revision 354408) +++ sbin/dhclient/dhclient-script (working copy) @@ -173,6 +173,9 @@ if [ "$new_ip_address" = "$router" ]; then route add default -iface $router >/dev/null 2>&1 else + if [ "$new_subnet_mask" = "255.255.255.255" ]; then + route add "$router" -iface "$interface" >/dev/null 2>&1 + fi route add default $router >/dev/null 2>&1 fi fi https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241792 for more details. Would be great to have this in CURRENT and MFC'd to 13.x and 12.x too if possible. A+ Dave