diff options
author | 2008-11-23 01:57:06 +0000 | |
---|---|---|
committer | 2008-11-23 01:57:06 +0000 | |
commit | c2e39cd3f6d1a66617f1d409b9212df305fd2ca4 (patch) | |
tree | 149e74026c0a53ee65f174fdf644e42eb5bbe7ea | |
parent | using ``wait queues' for sleep is a linuxism. Kill them and just sleep (diff) | |
download | wireguard-openbsd-c2e39cd3f6d1a66617f1d409b9212df305fd2ca4.tar.xz wireguard-openbsd-c2e39cd3f6d1a66617f1d409b9212df305fd2ca4.zip |
Create a new bpfN device whenever a dhclient is started. Multiple
interfaces can now be configured with dhcp during install and upgrades.
Problem most forcibly pointed out by Luis and Pedro at h2k8.
"go for it" deraadt@
-rw-r--r-- | distrib/miniroot/install.sub | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 5847f6ecfb4..fe49a9cfa1b 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.440 2008/11/11 23:36:13 krw Exp $ +# $OpenBSD: install.sub,v 1.441 2008/11/23 01:57:06 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2007 Todd Miller, Theo de Raadt, Ken Westerback @@ -675,6 +675,8 @@ v4_config() { elif dhcp_request $_ifs "$_name" || dhcp_request $_ifs ; then addhostent "127.0.0.1" "$_name" echo "dhcp NONE NONE NONE $_media" >>$_hn + # Create a new bpf in case we start another dhclient + makedev bpf$(ls /dev | grep -c "^bpf[0-9]") fi ;; *) _addr=$resp @@ -823,6 +825,8 @@ enable_network() { dhcpif="$dhcpif $if" cmd="ifconfig $if $name $mask $bcaddr $ext1 $ext2 down" cmd="$cmd; dhclient $if" + # Create a new bpf in case we start another dhclient + makedev bpf$(ls /dev | grep -c "^bpf[0-9]") ;; "rtsol") rtsolif="$rtsolif $if" |