From bugmaster at FreeBSD.org Mon Aug 3 11:07:07 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Aug 3 11:09:46 2009 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org Message-ID: <200908031107.n73B75xu088765@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/134918 rc rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 58 problems total. From linimon at FreeBSD.org Thu Aug 6 06:33:19 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Thu Aug 6 06:33:25 2009 Subject: conf/137470: [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameters for _mdconfig2_list over the value in rc.conf Message-ID: <200908060633.n766XI5o050943@freefall.freebsd.org> Synopsis: [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameters for _mdconfig2_list over the value in rc.conf Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Thu Aug 6 06:32:55 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=137470 From delphij at delphij.net Thu Aug 6 18:58:49 2009 From: delphij at delphij.net (Xin LI) Date: Thu Aug 6 18:58:55 2009 Subject: [RFC] script for binding ARP <-> IP pairs Message-ID: <4A7B2792.4090803@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Here is a new rc.d startup script, which helps to bind static ARP entries like this: static_arp_pairs="gw" arp_gw="172.16.1.254 00:1c:58:6a:7a:4c" At the beginning I was inclined to add an "options" part for this script which helps to set e.g. logging options for ARP but it looks that these would be redundant, i.e., can be done with easy /etc/sysctl.conf. Comments? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkp7J5IACgkQi+vbBBjt66Du7QCePX+p8F8u6i/4mCGW+I//eFBu O7oAn2TdLvcH9TFHR1bY3zKlJ8NTAJx4 =OAHW -----END PGP SIGNATURE----- -------------- next part -------------- #!/bin/sh # # Copyright (c) 2009 Xin LI # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # Configure static ARP table # # $FreeBSD$ # # PROVIDE: arp # REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr name="arp" start_cmd="arp_start" stop_cmd="arp_stop" arp_start() { if [ -n "${static_arp_pairs}" ]; then echo -n 'Binding static ARP pair:' for e in ${static_arp_pairs}; do echo -n " ${e}" eval arp_args=\$arp_${e} arp -S ${arp_args} >/dev/null 2>&1 done echo '.' fi } arp_stop() { if [ -n "${static_arp_pairs}" ]; then echo -n 'Unbinding static ARP pair:' for e in ${static_arp_pairs}; do echo -n " ${e}" eval arp_args=\$arp_${e} arp_args=`echo ${arp_args} | sed -e s,..:..:..:..:..:..,,g` arp -d ${arp_args} >/dev/null 2>&1 done echo '.' fi } load_rc_config $name run_rc_command "$1" From dougb at FreeBSD.org Thu Aug 6 21:44:40 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Thu Aug 6 21:44:46 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A7B2792.4090803@delphij.net> References: <4A7B2792.4090803@delphij.net> Message-ID: <4A7B487B.8060303@FreeBSD.org> Xin LI wrote: > Hi, > > Here is a new rc.d startup script, which helps to bind static ARP > entries like this: > > static_arp_pairs="gw" > arp_gw="172.16.1.254 00:1c:58:6a:7a:4c" > > At the beginning I was inclined to add an "options" part for this script > which helps to set e.g. logging options for ARP but it looks that these > would be redundant, i.e., can be done with easy /etc/sysctl.conf. > > Comments? This looks pretty good. My only suggestion would be to change the file name, $name and PROVIDE to static_arp (and then in your example above the second var would be static_arp_gw). I realize that currently we have a non-trivial number of legacy variables that don't match their related script names and/or $name, however going forward my preference would be that we not add any more examples of this. I also think it's a bit more descriptive of what you're doing in the script. hth, Doug From delphij at delphij.net Mon Aug 10 03:32:54 2009 From: delphij at delphij.net (Xin LI) Date: Mon Aug 10 03:33:03 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A7B487B.8060303@FreeBSD.org> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> Message-ID: <4A7F948A.2040602@delphij.net> Hi, Doug, Doug Barton wrote: > Xin LI wrote: >> Hi, >> >> Here is a new rc.d startup script, which helps to bind static ARP >> entries like this: >> >> static_arp_pairs="gw" >> arp_gw="172.16.1.254 00:1c:58:6a:7a:4c" >> >> At the beginning I was inclined to add an "options" part for this script >> which helps to set e.g. logging options for ARP but it looks that these >> would be redundant, i.e., can be done with easy /etc/sysctl.conf. >> >> Comments? > > This looks pretty good. My only suggestion would be to change the file > name, $name and PROVIDE to static_arp (and then in your example above > the second var would be static_arp_gw). I realize that currently we > have a non-trivial number of legacy variables that don't match their > related script names and/or $name, however going forward my preference > would be that we not add any more examples of this. I also think it's > a bit more descriptive of what you're doing in the script. Thanks for your comments, I have put together the revised patch, along with rc.conf.5 and defaults/rc.conf changes. Cheers, -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -------------- next part -------------- Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 196086) +++ etc/defaults/rc.conf (working copy) @@ -357,6 +357,7 @@ ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). +static_arp_pairs="" # Set to static ARP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Index: etc/rc.d/Makefile =================================================================== --- etc/rc.d/Makefile (revision 196086) +++ etc/rc.d/Makefile (working copy) @@ -32,7 +32,7 @@ random rarpd resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd swap1 \ + serial static_arp sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Index: etc/rc.d/static_arp =================================================================== --- etc/rc.d/static_arp (revision 0) +++ etc/rc.d/static_arp (revision 0) @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 2009 Xin LI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Configure static ARP table +# +# $FreeBSD$ +# + +# PROVIDE: static_arp +# REQUIRE: netif +# KEYWORD: nojail + +. /etc/rc.subr + +name="static_arp" +start_cmd="static_arp_start" +stop_cmd="static_arp_stop" + +static_arp_start() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Binding static ARP pair:' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp -S ${arp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +static_arp_stop() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Unbinding static ARP pair:' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp_args=`echo ${arp_args} | sed -e s,..:..:..:..:..:..,,g` + arp -d ${arp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 196086) +++ share/man/man5/rc.conf.5 (working copy) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd August 10, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -2227,6 +2227,23 @@ .Pq Vt str The IPv6 equivalent of .Va defaultrouter . +.It Va static_arp_pairs +.Pq Vt str +Set to the list of static ARP paris that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va +arp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm arp Cm -S +operation. +For example +.Bd -literal +static_arp_pairs="gw" +arp_gw="192.168.1.1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From dougb at FreeBSD.org Mon Aug 10 04:15:14 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 10 04:15:19 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A7F948A.2040602@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> Message-ID: <4A7F9EC6.9090605@FreeBSD.org> Xin LI wrote: > Thanks for your comments, I have put together the revised patch, along > with rc.conf.5 and defaults/rc.conf changes. Glad to help. This looks fine except that you need an entry for static_arp_enable in defaults rc.conf and rc.conf.5. Once you get that into the patch I would send it to -net for a final review, then ask re@ to commit it. Since this is off by default and affects only a small group of users I don't see any reason we can't add it, even at this late date. Doug -- This .signature sanitized for your protection From delphij at delphij.net Mon Aug 10 05:05:22 2009 From: delphij at delphij.net (Xin LI) Date: Mon Aug 10 05:05:27 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A7F9EC6.9090605@FreeBSD.org> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> Message-ID: <4A7FAA42.4030607@delphij.net> Hi, Doug, Doug Barton wrote: > Xin LI wrote: > >> Thanks for your comments, I have put together the revised patch, along >> with rc.conf.5 and defaults/rc.conf changes. > > Glad to help. This looks fine except that you need an entry for > static_arp_enable in defaults rc.conf and rc.conf.5. This script does not require the enable knob. If the static_arp_pairs is not empty then the script would add the entries, otherwise it will not do that. Do you think we need an "enable" knob for it? I can add it but I don't feel strongly for the idea, since it would make a redundant entry to represent the same semantic. Cheers, -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! From dougb at FreeBSD.org Mon Aug 10 05:35:34 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 10 05:35:40 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A7FAA42.4030607@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> Message-ID: On Sun, 9 Aug 2009, Xin LI wrote: > Hi, Doug, > > Doug Barton wrote: >> Xin LI wrote: >> >>> Thanks for your comments, I have put together the revised patch, along >>> with rc.conf.5 and defaults/rc.conf changes. >> >> Glad to help. This looks fine except that you need an entry for >> static_arp_enable in defaults rc.conf and rc.conf.5. > > This script does not require the enable knob. If the static_arp_pairs > is not empty then the script would add the entries, otherwise it will > not do that. Do you think we need an "enable" knob for it? I can add > it but I don't feel strongly for the idea, since it would make a > redundant entry to represent the same semantic. I missed the fact that you're not using rcvar. I'm sort of ambivalent about that, as I prefer things to be consistent, but I'm not actively opposed to it. If no one else has an objection go ahead and send it to -net. Doug -- This .signature sanitized for your protection From bugmaster at FreeBSD.org Mon Aug 10 11:07:04 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Aug 10 11:09:15 2009 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org Message-ID: <200908101107.n7AB7340025284@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/134918 rc rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 59 problems total. From linimon at FreeBSD.org Mon Aug 10 15:45:22 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Mon Aug 10 15:45:33 2009 Subject: conf/137629: [rc] background_dhclient rc.conf option causing double nfs mounts Message-ID: <200908101545.n7AFjL6a052964@freefall.freebsd.org> Old Synopsis: background_dhclient rc.conf option causing double nfs mounts New Synopsis: [rc] background_dhclient rc.conf option causing double nfs mounts Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Mon Aug 10 15:44:37 UTC 2009 Responsible-Changed-Why: I'm not sure if this is a problem in the rc scripts or not. Comments? http://www.freebsd.org/cgi/query-pr.cgi?pr=137629 From ady at freebsd.ady.ro Mon Aug 10 18:44:31 2009 From: ady at freebsd.ady.ro (Adrian Penisoara) Date: Mon Aug 10 18:44:37 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> Message-ID: <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> Hi, On Mon, Aug 10, 2009 at 7:34 AM, Doug Barton wrote: > On Sun, 9 Aug 2009, Xin LI wrote: > > Hi, Doug, >> >> Doug Barton wrote: >> >>> Xin LI wrote: >>> >>> Thanks for your comments, I have put together the revised patch, along >>>> with rc.conf.5 and defaults/rc.conf changes. >>>> >>> >>> Glad to help. This looks fine except that you need an entry for >>> static_arp_enable in defaults rc.conf and rc.conf.5. >>> >> >> This script does not require the enable knob. If the static_arp_pairs >> is not empty then the script would add the entries, otherwise it will >> not do that. Do you think we need an "enable" knob for it? I can add >> it but I don't feel strongly for the idea, since it would make a >> redundant entry to represent the same semantic. >> > > I missed the fact that you're not using rcvar. I'm sort of ambivalent about > that, as I prefer things to be I guess you could compare this to the cloned_interfaces rcvar... > consistent, but I'm not actively opposed to it. If no one else has an > objection go ahead and send it to -net. > Just a bit of QC/improvement: Index: etc/rc.d/static_arp =================================================================== - echo -n 'Binding static ARP pair:' + echo -n 'Binding static ARP pair(s):' - arp_args=`echo ${arp_args} | sed -e s,..:..:..:..:..:..,,g` + arp_args=`echo ${arp_args} | awk '{ print $1 }'` Index: share/man/man5/rc.conf.5 =================================================================== -Set to the list of static ARP paris that are to be added at system +Set to the list of static ARP pairs that are to be added at system Regards, Adrian Penisoara EnterpriseBSD From delphij at delphij.net Mon Aug 10 18:56:41 2009 From: delphij at delphij.net (Xin LI) Date: Mon Aug 10 18:56:47 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> Message-ID: <4A806D17.9020404@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Adrian, Adrian Penisoara wrote: [...] > Just a bit of QC/improvement: > > Index: etc/rc.d/static_arp > =================================================================== > - echo -n 'Binding static ARP pair:' > + echo -n 'Binding static ARP pair(s):' Thanks, I have changed both. > - arp_args=`echo ${arp_args} | sed -e > s,..:..:..:..:..:..,,g` > + arp_args=`echo ${arp_args} | awk '{ print $1 }'` After carefully reading the sh(1) manual, I find another way which does not need to use any sed/awk at all: arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 > Index: share/man/man5/rc.conf.5 > =================================================================== > -Set to the list of static ARP paris that are to be added at system > +Set to the list of static ARP pairs that are to be added at system Thanks, changed in the patch. Here is the revised patch based on your comments. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqAbRYACgkQi+vbBBjt66ADfwCgp79vVw0kMv1qYYc7Lmjkwn6s FEAAnjjOxHVBifAKpbnnU01XOZynij6W =P5jW -----END PGP SIGNATURE----- -------------- next part -------------- Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 196086) +++ etc/defaults/rc.conf (working copy) @@ -357,6 +357,7 @@ ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). +static_arp_pairs="" # Set to static ARP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Index: etc/rc.d/Makefile =================================================================== --- etc/rc.d/Makefile (revision 196086) +++ etc/rc.d/Makefile (working copy) @@ -32,7 +32,7 @@ random rarpd resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd swap1 \ + serial static_arp sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Index: etc/rc.d/static_arp =================================================================== --- etc/rc.d/static_arp (revision 0) +++ etc/rc.d/static_arp (revision 0) @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Copyright (c) 2009 Xin LI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Configure static ARP table +# +# $FreeBSD$ +# + +# PROVIDE: static_arp +# REQUIRE: netif +# KEYWORD: nojail + +. /etc/rc.subr + +name="static_arp" +start_cmd="static_arp_start" +stop_cmd="static_arp_stop" + +static_arp_start() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Binding static ARP pair(s):' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp -S ${arp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +static_arp_stop() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Unbinding static ARP pair(s):' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 + done + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 196086) +++ share/man/man5/rc.conf.5 (working copy) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd August 10, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -2227,6 +2227,23 @@ .Pq Vt str The IPv6 equivalent of .Va defaultrouter . +.It Va static_arp_pairs +.Pq Vt str +Set to the list of static ARP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va +arp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm arp Cm -S +operation. +For example +.Bd -literal +static_arp_pairs="gw" +arp_gw="192.168.1.1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From ady at freebsd.ady.ro Tue Aug 11 00:01:37 2009 From: ady at freebsd.ady.ro (Adrian Penisoara) Date: Tue Aug 11 00:01:48 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> Message-ID: <78cb3d3f0908101701o6ea649cfk6a7d5e721d079866@mail.gmail.com> Hi, On Mon, Aug 10, 2009 at 8:13 PM, Adrian Penisoara wrote: > Hi, > > On Mon, Aug 10, 2009 at 7:34 AM, Doug Barton wrote: > >> On Sun, 9 Aug 2009, Xin LI wrote: >> >> Hi, Doug, >>> >>> Doug Barton wrote: >>> >>>> Xin LI wrote: >>>> >>>> Thanks for your comments, I have put together the revised patch, along >>>>> with rc.conf.5 and defaults/rc.conf changes. >>>>> >>>> >>>> Glad to help. This looks fine except that you need an entry for >>>> static_arp_enable in defaults rc.conf and rc.conf.5. >>>> >>> >>> This script does not require the enable knob. If the static_arp_pairs >>> is not empty then the script would add the entries, otherwise it will >>> not do that. Do you think we need an "enable" knob for it? I can add >>> it but I don't feel strongly for the idea, since it would make a >>> redundant entry to represent the same semantic. >>> >> >> I missed the fact that you're not using rcvar. I'm sort of ambivalent >> about that, as I prefer things to be > > > I guess you could compare this to the cloned_interfaces rcvar... > > I stand corrected: it's rather more similar to the "static_routes / route_xxx" concept. I guess we have an entire class of such rc subroutines which are not $name_enable'd. Regards, Adrian. From dougb at FreeBSD.org Mon Aug 17 05:42:49 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 17 05:43:00 2009 Subject: virtualize rtsol test for wireless interfaces in network.subr Message-ID: <4A88EDCE.3030306@FreeBSD.org> I recently added a test in network.subr (for 8.x only) to make sure that we are not trying IPv6 rtsol on the underlying wireless interfaces. Sam subsequently asked me to make that test virtual rather then listing specific interfaces, which I agreed was definitely the better approach. The attached patch moves is_wired_interface() into network.subr, simplifies it a bit, and uses that method in the rtsol test as well. Please let me know what you think. I'd like to get this into 8.0-RELEASE, but I don't regard it as crucial. Doug -- This .signature sanitized for your protection -------------- next part -------------- Index: network.subr =================================================================== --- network.subr (revision 196279) +++ network.subr (working copy) @@ -816,6 +816,18 @@ echo ${str} } +is_wired_interface() +{ + local media + + case `ifconfig $1 2>/dev/null` in + *media:?Ethernet*) media=Ethernet ;; + esac + + test "$media" = "Ethernet" +} + + # Setup the interfaces for IPv6 network6_interface_setup() { @@ -858,14 +870,19 @@ ifconfig $i inet6 ${ipv6_ifconfig} alias fi + # Wireless NIC cards are virtualized through the wlan interface + if ! is_wired_interface ${i}; then + case "${i}" in + wlan*) rtsol_available=yes ;; + *) rtsol_available=no ;; + esac + fi + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] then case ${i} in lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*|pflog[0-9]*|pfsync[0-9]*) ;; - # Wireless NIC cards are virtualized through the wlan interface - an[0-9]*|ath[0-9]*|ipw[0-9]*|iwi[0-9]*|iwn[0-9]*|ral[0-9]*|wi[0-9]*|wl[0-9]*|wpi[0-9]*) - ;; *) rtsol_interfaces="${rtsol_interfaces} ${i}" ;; Index: rc.d/wpa_supplicant =================================================================== --- rc.d/wpa_supplicant (revision 196279) +++ rc.d/wpa_supplicant (working copy) @@ -18,18 +18,6 @@ return 1 fi -is_wired_interface() -{ - media=`ifconfig $1 2>/dev/null | while read line; do - case "$line" in - *media:?Ethernet*) - echo Ethernet - ;; - esac - done` - test "$media" = "Ethernet" -} - is_ndis_interface() { case `sysctl -n net.wlan.${1#wlan}.%parent 2>/dev/null` in From bugmaster at FreeBSD.org Mon Aug 17 11:07:02 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Aug 17 11:09:34 2009 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org Message-ID: <200908171107.n7HB72N7075924@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/137629 rc [rc] background_dhclient rc.conf option causing double o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/134918 rc rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 60 problems total. From linimon at FreeBSD.org Sun Aug 23 05:52:04 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Sun Aug 23 05:52:10 2009 Subject: conf/138087: [patch] fix typo in etc/rc.d/ipsec Message-ID: <200908230552.n7N5q3IL087495@freefall.freebsd.org> Old Synopsis: fix typo in etc/rc.d/ipsec New Synopsis: [patch] fix typo in etc/rc.d/ipsec Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Sun Aug 23 05:51:41 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=138087 From dougb at FreeBSD.org Sun Aug 23 05:58:08 2009 From: dougb at FreeBSD.org (dougb@FreeBSD.org) Date: Sun Aug 23 05:58:13 2009 Subject: conf/138087: [patch] fix typo in etc/rc.d/ipsec Message-ID: <200908230558.n7N5w7CD087636@freefall.freebsd.org> Synopsis: [patch] fix typo in etc/rc.d/ipsec State-Changed-From-To: open->patched State-Changed-By: dougb State-Changed-When: Sun Aug 23 05:54:37 UTC 2009 State-Changed-Why: Thanks for your interest in making FreeBSD better! I've patched this in HEAD but I don't plan to MFC it until after the upcoming 8.0 release so please be patient. Doug Responsible-Changed-From-To: freebsd-rc->dougb Responsible-Changed-By: dougb Responsible-Changed-When: Sun Aug 23 05:54:37 UTC 2009 Responsible-Changed-Why: I'll handle this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=138087 From bugmaster at FreeBSD.org Mon Aug 24 11:07:03 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Aug 24 11:09:18 2009 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org Message-ID: <200908241107.n7OB72Es048711@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/137629 rc [rc] background_dhclient rc.conf option causing double o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/134918 rc rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 60 problems total. From delphij at delphij.net Tue Aug 25 00:40:10 2009 From: delphij at delphij.net (Xin LI) Date: Tue Aug 25 00:40:21 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A806D17.9020404@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> Message-ID: <4A933294.8000906@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Any objections for the attached patch? I'll commit this version if everybody is happy with it and then see if re@ would approve it for 8.0-RELEASE. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqTMpQACgkQi+vbBBjt66CoRQCgwRQaFjKsZE8+jj/CXGdl0I8n 74oAn0ptg/pwgHSDmw9iUbQcEXlJULhu =UvH8 -----END PGP SIGNATURE----- -------------- next part -------------- Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 196516) +++ etc/defaults/rc.conf (working copy) @@ -357,6 +357,7 @@ ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). +static_arp_pairs="" # Set to static ARP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Index: etc/rc.d/Makefile =================================================================== --- etc/rc.d/Makefile (revision 196516) +++ etc/rc.d/Makefile (working copy) @@ -32,7 +32,7 @@ random rarpd resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd swap1 \ + serial sppp statd static_arp swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Index: etc/rc.d/static_arp =================================================================== --- etc/rc.d/static_arp (revision 0) +++ etc/rc.d/static_arp (revision 0) @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Copyright (c) 2009 Xin LI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Configure static ARP table +# +# $FreeBSD$ +# + +# PROVIDE: static_arp +# REQUIRE: netif +# KEYWORD: nojail + +. /etc/rc.subr + +name="static_arp" +start_cmd="static_arp_start" +stop_cmd="static_arp_stop" + +static_arp_start() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Binding static ARP pair(s):' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp -S ${arp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +static_arp_stop() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Unbinding static ARP pair(s):' + for e in ${static_arp_pairs}; do + echo -n " ${e}" + eval arp_args=\$arp_${e} + arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 + done + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 196516) +++ share/man/man5/rc.conf.5 (working copy) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd August 10, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -2227,6 +2227,23 @@ .Pq Vt str The IPv6 equivalent of .Va defaultrouter . +.It Va static_arp_pairs +.Pq Vt str +Set to the list of static ARP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va +arp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm arp Cm -S +operation. +For example +.Bd -literal +static_arp_pairs="gw" +arp_gw="192.168.1.1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From dougb at FreeBSD.org Tue Aug 25 00:49:44 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Tue Aug 25 00:49:50 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A933294.8000906@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> Message-ID: <4A93351E.2020107@FreeBSD.org> Xin LI wrote: > Any objections for the attached patch? I'll commit this version if > everybody is happy with it and then see if re@ would approve it for > 8.0-RELEASE. Sorry if I wasn't clear before, but all of the rc.conf variables should be prepended with static_arp_ (as opposed to just arp_). So rather than arp_args you'd want static_arp_args. I realize you're not using set_rcvar() but it's still a good idea to do that for consistency's sake, as well as to make it easier for admins to sort stuff, etc. Please make sure you change that in the man page as well. Other than that it looks fine to me. Silly question that I'm sorry just occurred to me right now, have you tested this with IPv6? :) Doug -- This .signature sanitized for your protection From hrs at FreeBSD.org Tue Aug 25 00:57:40 2009 From: hrs at FreeBSD.org (Hiroki Sato) Date: Tue Aug 25 00:58:12 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A93351E.2020107@FreeBSD.org> References: <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> <4A93351E.2020107@FreeBSD.org> Message-ID: <20090825.095656.100103076.hrs@allbsd.org> Doug Barton wrote in <4A93351E.2020107@FreeBSD.org>: do> Xin LI wrote: do> > Any objections for the attached patch? I'll commit this version if do> > everybody is happy with it and then see if re@ would approve it for do> > 8.0-RELEASE. do> do> Sorry if I wasn't clear before, but all of the rc.conf variables do> should be prepended with static_arp_ (as opposed to just arp_). So do> rather than arp_args you'd want static_arp_args. I realize you're not do> using set_rcvar() but it's still a good idea to do that for do> consistency's sake, as well as to make it easier for admins to sort do> stuff, etc. Please make sure you change that in the man page as well. I agree with this. do> Silly question that I'm sorry just occurred to me right now, have you do> tested this with IPv6? :) IPv6 uses NDP (see ndp(8)), not ARP, so no consideration is needed for $static_arp_* variables at least. -- Hiroki -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20090825/91265f0c/attachment.pgp From delphij at delphij.net Tue Aug 25 01:18:08 2009 From: delphij at delphij.net (Xin LI) Date: Tue Aug 25 01:18:15 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A93351E.2020107@FreeBSD.org> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> <4A93351E.2020107@FreeBSD.org> Message-ID: <4A933B77.7030108@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Doug Barton wrote: > Xin LI wrote: >> Any objections for the attached patch? I'll commit this version if >> everybody is happy with it and then see if re@ would approve it for >> 8.0-RELEASE. > > Sorry if I wasn't clear before, but all of the rc.conf variables > should be prepended with static_arp_ (as opposed to just arp_). So > rather than arp_args you'd want static_arp_args. I realize you're not > using set_rcvar() but it's still a good idea to do that for > consistency's sake, as well as to make it easier for admins to sort > stuff, etc. Please make sure you change that in the man page as well. I see. I have corrected arp_ prefixes to static_arp_ prefixes. Note that "arp_args" are not changed because they are intermediate variables that are intended as "arp(1) arguments". I have marked these as local. > Other than that it looks fine to me. > > Silly question that I'm sorry just occurred to me right now, have you > tested this with IPv6? :) I think IPv6 would need to use "ndp" instead (cross referenced from arp(8)) but am not sure. Because the script rely on space or tab as separator I think it would just work after a simple s/arp/ndp/g for ndp but I don't have a local production IPv6 network for the test... Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqTO3cACgkQi+vbBBjt66CtWwCZARUOgOP3AoZEEEeCCXl9ziVT ZwsAoIC1cmv6d0QY7z1RjEoFcfz0Sey/ =py3J -----END PGP SIGNATURE----- -------------- next part -------------- Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 196516) +++ etc/defaults/rc.conf (working copy) @@ -357,6 +357,7 @@ ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). +static_arp_pairs="" # Set to static ARP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Index: etc/rc.d/Makefile =================================================================== --- etc/rc.d/Makefile (revision 196516) +++ etc/rc.d/Makefile (working copy) @@ -32,7 +32,7 @@ random rarpd resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd swap1 \ + serial sppp statd static_arp swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Index: etc/rc.d/static_arp =================================================================== --- etc/rc.d/static_arp (revision 0) +++ etc/rc.d/static_arp (revision 0) @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Copyright (c) 2009 Xin LI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Configure static ARP table +# +# $FreeBSD$ +# + +# PROVIDE: static_arp +# REQUIRE: netif +# KEYWORD: nojail + +. /etc/rc.subr + +name="static_arp" +start_cmd="static_arp_start" +stop_cmd="static_arp_stop" + +static_arp_start() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Binding static ARP pair(s):' + for e in ${static_arp_pairs}; do + local arp_args + echo -n " ${e}" + eval arp_args=\$static_arp_${e} + arp -S ${arp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +static_arp_stop() +{ + if [ -n "${static_arp_pairs}" ]; then + echo -n 'Unbinding static ARP pair(s):' + for e in ${static_arp_pairs}; do + local arp_args + echo -n " ${e}" + eval arp_args=\$static_arp_${e} + arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 + done + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 196516) +++ share/man/man5/rc.conf.5 (working copy) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd August 25, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -2227,6 +2227,22 @@ .Pq Vt str The IPv6 equivalent of .Va defaultrouter . +.It Va static_arp_pairs +.Pq Vt str +Set to the list of static ARP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va static_arp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm arp Cm -S +operation. +For example +.Bd -literal +static_arp_pairs="gw" +static_arp_gw="192.168.1.1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From ady at freebsd.ady.ro Tue Aug 25 14:55:23 2009 From: ady at freebsd.ady.ro (Adrian Penisoara) Date: Tue Aug 25 14:55:29 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A933B77.7030108@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> <4A93351E.2020107@FreeBSD.org> <4A933B77.7030108@delphij.net> Message-ID: <78cb3d3f0908250748j16ff3879y4ea28fd83b0780c0@mail.gmail.com> Hi, On Tue, Aug 25, 2009 at 3:16 AM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Doug Barton wrote: > > Xin LI wrote: > >> Any objections for the attached patch? I'll commit this version if > >> everybody is happy with it and then see if re@ would approve it for > >> 8.0-RELEASE. > > > > Sorry if I wasn't clear before, but all of the rc.conf variables > > should be prepended with static_arp_ (as opposed to just arp_). So > > rather than arp_args you'd want static_arp_args. I realize you're not > > using set_rcvar() but it's still a good idea to do that for > > consistency's sake, as well as to make it easier for admins to sort > > stuff, etc. Please make sure you change that in the man page as well. > For consistency we should leave it as "arp_xxx" like it's currently done for static_routes/route_xxx and ipv6_static_routes/ipv6_route_xxx ... If we want to keep consistency then either leave it as "static_arp_pairs/arp_xxx" or change it to something like "static_arps/arp_xxx > > > I see. I have corrected arp_ prefixes to static_arp_ prefixes. Note > that "arp_args" are not changed because they are intermediate variables > that are intended as "arp(1) arguments". I have marked these as local. > > > Other than that it looks fine to me. > > > > Silly question that I'm sorry just occurred to me right now, have you > > tested this with IPv6? :) > > I think IPv6 would need to use "ndp" instead (cross referenced from > arp(8)) but am not sure. Because the script rely on space or tab as > separator I think it would just work after a simple s/arp/ndp/g for ndp > but I don't have a local production IPv6 network for the test... > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.12 (FreeBSD) > > iEYEARECAAYFAkqTO3cACgkQi+vbBBjt66CtWwCZARUOgOP3AoZEEEeCCXl9ziVT > ZwsAoIC1cmv6d0QY7z1RjEoFcfz0Sey/ > =py3J > -----END PGP SIGNATURE----- > > Index: etc/defaults/rc.conf > =================================================================== > --- etc/defaults/rc.conf (revision 196516) > +++ etc/defaults/rc.conf (working copy) > @@ -357,6 +357,7 @@ > > ### Network routing options: ### > defaultrouter="NO" # Set to default gateway (or NO). > +static_arp_pairs="" # Set to static ARP list (or leave empty). > static_routes="" # Set to static route list (or leave > empty). > natm_static_routes="" # Set to static route list for NATM (or > leave empty). > gateway_enable="NO" # Set to YES if this host will be a > gateway. > Please add commented line(s) as an example on how to use this, like for ipv6_static_routes: #static_arp_pairs="xxx" # An example to set an ARP static entry #arp_xxx="10.20.30.40 00:11:22:33:44:55" Regards, Adrian Penisoara EnterpriseBSD From dougb at FreeBSD.org Tue Aug 25 17:16:54 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Tue Aug 25 17:17:00 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <4A933B77.7030108@delphij.net> References: <4A7B2792.4090803@delphij.net> <4A7B487B.8060303@FreeBSD.org> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> <4A93351E.2020107@FreeBSD.org> <4A933B77.7030108@delphij.net> Message-ID: <4A941C7F.2070503@FreeBSD.org> Xin LI wrote: > Doug Barton wrote: >> Xin LI wrote: >>> Any objections for the attached patch? I'll commit this version if >>> everybody is happy with it and then see if re@ would approve it for >>> 8.0-RELEASE. >> Sorry if I wasn't clear before, but all of the rc.conf variables >> should be prepended with static_arp_ (as opposed to just arp_). So >> rather than arp_args you'd want static_arp_args. I realize you're not >> using set_rcvar() but it's still a good idea to do that for >> consistency's sake, as well as to make it easier for admins to sort >> stuff, etc. Please make sure you change that in the man page as well. > > I see. I have corrected arp_ prefixes to static_arp_ prefixes. Note > that "arp_args" are not changed because they are intermediate variables > that are intended as "arp(1) arguments". I have marked these as local. That look great, commit it when you are ready. :) >> Other than that it looks fine to me. > >> Silly question that I'm sorry just occurred to me right now, have you >> tested this with IPv6? :) > > I think IPv6 would need to use "ndp" instead (cross referenced from > arp(8)) but am not sure. Because the script rely on space or tab as > separator I think it would just work after a simple s/arp/ndp/g for ndp > but I don't have a local production IPv6 network for the test... Sorry, I had intended that as a joke since in general we're trying to achieve parity in IPv6 for the features in IPv4. Looking back it's not even that funny to me anymore .... :) Doug -- This .signature sanitized for your protection From dougb at FreeBSD.org Tue Aug 25 19:23:01 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Tue Aug 25 19:24:52 2009 Subject: [RFC] script for binding ARP <-> IP pairs In-Reply-To: <78cb3d3f0908250748j16ff3879y4ea28fd83b0780c0@mail.gmail.com> References: <4A7B2792.4090803@delphij.net> <4A7F948A.2040602@delphij.net> <4A7F9EC6.9090605@FreeBSD.org> <4A7FAA42.4030607@delphij.net> <78cb3d3f0908101113s412021adk8956dd083a8fed72@mail.gmail.com> <4A806D17.9020404@delphij.net> <4A933294.8000906@delphij.net> <4A93351E.2020107@FreeBSD.org> <4A933B77.7030108@delphij.net> <78cb3d3f0908250748j16ff3879y4ea28fd83b0780c0@mail.gmail.com> Message-ID: <4A943A0C.9000305@FreeBSD.org> Adrian Penisoara wrote: >> For consistency we should leave it as "arp_xxx" like it's currently done >> for static_routes/route_xxx and ipv6_static_routes/ipv6_route_xxx ... The fact that there are legacy examples that don't use a consistent prepend is not a reason to add more. Doug -- This .signature sanitized for your protection From delphij at delphij.net Tue Aug 25 21:18:04 2009 From: delphij at delphij.net (Xin LI) Date: Tue Aug 25 21:18:11 2009 Subject: svn commit: r196550 - in head: etc/defaults etc/rc.d share/man/man5 In-Reply-To: <20090825194258.GB1471@tops> References: <200908251907.n7PJ7QiO036868@svn.freebsd.org> <20090825194258.GB1471@tops> Message-ID: <4A9454B2.2040808@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [Moved to -rc@] Hi, Gleb, Gleb Kurtsou wrote: [...] > Would you please add support for reading pairs from file, that should be > trivial. I've been using my own rc script for reading static arp entries > from file but can't find it right now. I think it's what 'arp -f' would do. However I didn't found a easy way to revert its effect, do you have some ideas about it or we need to teach arp(8) to do that? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqUVLIACgkQi+vbBBjt66CzEgCfa9MShg0JzYxKyA2oFWq3prK6 S7AAn3MGN0QUzRCuPxM2tk5g/hHwvOXR =DrCH -----END PGP SIGNATURE----- From gleb.kurtsou at gmail.com Tue Aug 25 23:51:46 2009 From: gleb.kurtsou at gmail.com (Gleb Kurtsou) Date: Tue Aug 25 23:51:52 2009 Subject: svn commit: r196550 - in head: etc/defaults etc/rc.d share/man/man5 In-Reply-To: <4A9454B2.2040808@delphij.net> References: <200908251907.n7PJ7QiO036868@svn.freebsd.org> <20090825194258.GB1471@tops> <4A9454B2.2040808@delphij.net> Message-ID: <20090825232558.GA1208@tops> On (25/08/2009 14:16), Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > [Moved to -rc@] > > Hi, Gleb, > > Gleb Kurtsou wrote: > [...] > > Would you please add support for reading pairs from file, that should be > > trivial. I've been using my own rc script for reading static arp entries > > from file but can't find it right now. > > I think it's what 'arp -f' would do. However I didn't found a easy way > to revert its effect, do you have some ideas about it or we need to > teach arp(8) to do that? 'arp -f' is just fine it parses all the options arp has for static entries. I was thinking of something like 'static_arp_files' variable. I've added support for 'arg -d -f' in attached patch (man page part is missing), hope it helps. Thanks, Gleb. > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.12 (FreeBSD) > > iEYEARECAAYFAkqUVLIACgkQi+vbBBjt66CzEgCfa9MShg0JzYxKyA2oFWq3prK6 > S7AAn3MGN0QUzRCuPxM2tk5g/hHwvOXR > =DrCH > -----END PGP SIGNATURE----- -------------- next part -------------- diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 8a3410f..11d1df6 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -101,7 +101,7 @@ static int valid_type(int type); static int nflag; /* no reverse dns lookups */ static char *rifname; -static int expire_time, flags, doing_proxy, proxy_only; +static int expire_time, flags, func, doing_proxy, proxy_only; /* which function we're supposed to do */ #define F_GET 1 @@ -109,23 +109,28 @@ static int expire_time, flags, doing_proxy, proxy_only; #define F_FILESET 3 #define F_REPLACE 4 #define F_DELETE 5 +#define F_FILEDELETE 6 #define SETFUNC(f) { if (func) usage(); func = (f); } int main(int argc, char *argv[]) { - int ch, func = 0; + int ch; int rtn = 0; int aflag = 0; /* do it for all entries */ + func = 0; while ((ch = getopt(argc, argv, "andfsSi:")) != -1) switch(ch) { case 'a': aflag = 1; break; case 'd': - SETFUNC(F_DELETE); + if (func == F_FILESET) + func = F_FILEDELETE; + else + SETFUNC(F_DELETE); break; case 'n': nflag = 1; @@ -137,7 +142,10 @@ main(int argc, char *argv[]) SETFUNC(F_SET); break; case 'f' : - SETFUNC(F_FILESET); + if (func == F_DELETE) + func = F_FILEDELETE; + else + SETFUNC(F_FILESET); break; case 'i': rifname = optarg; @@ -197,6 +205,7 @@ main(int argc, char *argv[]) } break; case F_FILESET: + case F_FILEDELETE: if (argc != 1) usage(); rtn = file(argv[0]); @@ -213,7 +222,7 @@ static int file(char *name) { FILE *fp; - int i, retval; + int i, j, retval; char line[100], arg[5][50], *args[5], *p; if ((fp = fopen(name, "r")) == NULL) @@ -237,8 +246,23 @@ file(char *name) retval = 1; continue; } - if (set(i, args)) - retval = 1; + switch (func) { + case F_FILESET: + if (set(i, args)) + retval = 1; + break; + case F_FILEDELETE: + for (j = 2; j < i; j++) + if (strncmp(args[j], "pub", 3) == 0) { + j = 0; + break; + } + if (delete(args[0], j == 0 ? SIN_PROXY : 0)) + retval = 1; + break; + default: + usage(); + } } fclose(fp); return (retval); @@ -650,11 +674,12 @@ nuke_entry(struct sockaddr_dl *sdl __unused, static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: arp [-n] [-i interface] hostname", " arp [-n] [-i interface] -a", " arp -d hostname [pub]", " arp -d [-i interface] -a", + " arp -d -f filename", " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", " arp -f filename"); From linimon at FreeBSD.org Wed Aug 26 20:48:32 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Wed Aug 26 20:48:44 2009 Subject: conf/138208: [rc] [patch] Making rc.firewall (workstation) IPv6 aware Message-ID: <200908262048.n7QKmVqX018855@freefall.freebsd.org> Old Synopsis: [patch] Making rc.firewall (workstation) IPv6 aware New Synopsis: [rc] [patch] Making rc.firewall (workstation) IPv6 aware Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Wed Aug 26 20:48:08 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=138208 From bugmaster at FreeBSD.org Mon Aug 31 11:07:15 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Aug 31 11:09:24 2009 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org Message-ID: <200908311107.n7VB7Ej3070691@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/138208 rc [rc] [patch] Making rc.firewall (workstation) IPv6 awa o conf/137629 rc [rc] background_dhclient rc.conf option causing double o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/134918 rc [patch] rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 61 problems total.