Massimo Lusetti
2006-Sep-15 08:52 UTC
[flashboot] isakmpd odd behavior and rc.initial normalize
I got a strange behavior[1] running isakmpd with -K at boot, this happen only on the flashboot-box (which is GENERIC-RD right now) not on the box used to build flashboot image. Flashboot is the 20060915 cvs snapshot as OpenBSD is cvs updated at the same date. In regards of this error i try to workaround this behavior setting isakmpd to boot with -4 -K flags, which this settings isakmpd starts fine. During this process I''ve noticed that settling isakmpd_flags="-4 -K" in rc.conf result in a script error by /etc/rc which does not handle blank in *_flags variables in some cases so i just made a quick fix (attached) normalizing the test cases under rc.initial. Hope this helps and if someone would like to suggest why the i got the below behavior I''m more then happy to try to understand :) Regards [1] Sep 15 18:38:25 c7-2 isakmpd[7958]: m_priv_bind: bind(6,0x858220c0,28) returned -1: Can''t assign requested address Sep 15 18:38:25 c7-2 isakmpd[27957]: udp_make: bind (24, fe80:3::230:18ff:fea4:a965, 4): Can''t assign requested address Sep 15 18:38:25 c7-2 isakmpd[27957]: virtual_bind_if: failed to create a socket on fe80:3::230:18ff:fea4:a965 Sep 15 18:38:25 c7-2 isakmpd[27957]: virtual_init: could not bind the ISAKMP port(s) on all interfaces: Can''t assign requested address -- Massimo.run(); -------------- next part -------------- --- rc.initial.ori Fri Sep 15 10:27:52 2006 +++ rc.initial Fri Sep 15 10:34:41 2006 @@ -188,7 +188,7 @@ echo -n '' hostapd''; /usr/sbin/hostapd ${hostapd_flags} fi -if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then +if [ X"${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then touch /var/db/dhcpd.leases if [ -f /etc/dhcpd.interfaces ]; then dhcpd_ifs=`stripcom /etc/dhcpd.interfaces` @@ -196,7 +196,7 @@ echo -n '' dhcpd''; /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs} fi -if [ "X${spamd_flags}" != X"NO" ]; then +if [ X"${spamd_flags}" != X"NO" ]; then echo -n '' spamd''; /usr/libexec/spamd ${spamd_flags} /usr/libexec/spamd-setup fi @@ -205,19 +205,19 @@ echo -n '' ftp-proxy''; /usr/sbin/ftp-proxy ${ftpproxy_flags} fi -if [ "X${identd_flags}" != X"NO" ]; then +if [ X"${identd_flags}" != X"NO" ]; then echo -n '' identd''; /usr/libexec/identd ${identd_flags} fi -if [ X${inetd} != X"NO" -a -e /etc/inetd.conf ]; then +if [ X"${inetd}" != X"NO" -a -e /etc/inetd.conf ]; then echo -n '' inetd''; inetd fi -if [ X${ospfd_flags} != X"NO" -a -e /etc/osfpd.conf ]; then +if [ X"${ospfd_flags}" != X"NO" -a -e /etc/osfpd.conf ]; then echo -n '' osfpd''; osfpd ${osfpd_flags} fi -if [ X${bgpd_flags} != X"NO" -a -e /etc/bgpd.conf ]; then +if [ X"${bgpd_flags}" != X"NO" -a -e /etc/bgpd.conf ]; then echo -n '' bgpd''; bgpd ${bgpd_flags} fi @@ -246,7 +246,7 @@ echo ''starting sasyncd''; sasyncd ${sasyncd_flags} fi -if [ X${isakmpd_flags} != X"NO" ]; then +if [ X"${isakmpd_flags}" != X"NO" ]; then echo -n '' isakmpd''; isakmpd ${isakmpd_flags} fi @@ -254,7 +254,7 @@ ipsecctl -f /etc/ipsec.conf fi -if [ X${ntpd_flags} != X"NO" -a -e /etc/ntpd.conf ]; then +if [ X"${ntpd_flags}" != X"NO" -a -e /etc/ntpd.conf ]; then echo -n '' ntpd''; ntpd ${ntpd_flags} fi
Massimo Lusetti
2006-Sep-15 09:30 UTC
[flashboot] isakmpd odd behavior and rc.initial normalize
On Fri, 2006-09-15 at 10:52 +0200, Massimo Lusetti wrote:> Hope this helps and if someone would like to suggest why the i got the > below behavior I''m more then happy to try to understand :)I forgot to mention that firing /sbin/isakmpd -K at prompt after the boot process complete start isakmpd without any problem so i guess is really something like a ''race'' during the boot process. -- Massimo.run();
Rickard Dahlstrand
2006-Sep-15 16:00 UTC
[flashboot] isakmpd odd behavior and rc.initial normalize
Excellent. Rickard. Massimo Lusetti wrote:> I got a strange behavior[1] running isakmpd with -K at boot, this happen > only on the flashboot-box (which is GENERIC-RD right now) not on the box > used to build flashboot image. > Flashboot is the 20060915 cvs snapshot as OpenBSD is cvs updated at the > same date. > > In regards of this error i try to workaround this behavior setting > isakmpd to boot with -4 -K flags, which this settings isakmpd starts > fine. > > During this process I''ve noticed that settling isakmpd_flags="-4 -K" in > rc.conf result in a script error by /etc/rc which does not handle blank > in *_flags variables in some cases so i just made a quick fix (attached) > normalizing the test cases under rc.initial. > > Hope this helps and if someone would like to suggest why the i got the > below behavior I''m more then happy to try to understand :) > > > Regards > > > > [1] > Sep 15 18:38:25 c7-2 isakmpd[7958]: m_priv_bind: bind(6,0x858220c0,28) > returned -1: Can''t assign requested address > Sep 15 18:38:25 c7-2 isakmpd[27957]: udp_make: bind (24, > fe80:3::230:18ff:fea4:a965, 4): Can''t assign requested address > Sep 15 18:38:25 c7-2 isakmpd[27957]: virtual_bind_if: failed to create a > socket on fe80:3::230:18ff:fea4:a965 > Sep 15 18:38:25 c7-2 isakmpd[27957]: virtual_init: could not bind the > ISAKMP port(s) on all interfaces: Can''t assign requested address > > > > > > ------------------------------------------------------------------------ > > --- rc.initial.ori Fri Sep 15 10:27:52 2006 > +++ rc.initial Fri Sep 15 10:34:41 2006 > @@ -188,7 +188,7 @@ > echo -n '' hostapd''; /usr/sbin/hostapd ${hostapd_flags} > fi > > -if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then > +if [ X"${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then > touch /var/db/dhcpd.leases > if [ -f /etc/dhcpd.interfaces ]; then > dhcpd_ifs=`stripcom /etc/dhcpd.interfaces` > @@ -196,7 +196,7 @@ > echo -n '' dhcpd''; /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs} > fi > > -if [ "X${spamd_flags}" != X"NO" ]; then > +if [ X"${spamd_flags}" != X"NO" ]; then > echo -n '' spamd''; /usr/libexec/spamd ${spamd_flags} > /usr/libexec/spamd-setup > fi > @@ -205,19 +205,19 @@ > echo -n '' ftp-proxy''; /usr/sbin/ftp-proxy ${ftpproxy_flags} > fi > > -if [ "X${identd_flags}" != X"NO" ]; then > +if [ X"${identd_flags}" != X"NO" ]; then > echo -n '' identd''; /usr/libexec/identd ${identd_flags} > fi > > -if [ X${inetd} != X"NO" -a -e /etc/inetd.conf ]; then > +if [ X"${inetd}" != X"NO" -a -e /etc/inetd.conf ]; then > echo -n '' inetd''; inetd > fi > > -if [ X${ospfd_flags} != X"NO" -a -e /etc/osfpd.conf ]; then > +if [ X"${ospfd_flags}" != X"NO" -a -e /etc/osfpd.conf ]; then > echo -n '' osfpd''; osfpd ${osfpd_flags} > fi > > -if [ X${bgpd_flags} != X"NO" -a -e /etc/bgpd.conf ]; then > +if [ X"${bgpd_flags}" != X"NO" -a -e /etc/bgpd.conf ]; then > echo -n '' bgpd''; bgpd ${bgpd_flags} > fi > > @@ -246,7 +246,7 @@ > echo ''starting sasyncd''; sasyncd ${sasyncd_flags} > fi > > -if [ X${isakmpd_flags} != X"NO" ]; then > +if [ X"${isakmpd_flags}" != X"NO" ]; then > echo -n '' isakmpd''; isakmpd ${isakmpd_flags} > fi > > @@ -254,7 +254,7 @@ > ipsecctl -f /etc/ipsec.conf > fi > > -if [ X${ntpd_flags} != X"NO" -a -e /etc/ntpd.conf ]; then > +if [ X"${ntpd_flags}" != X"NO" -a -e /etc/ntpd.conf ]; then > echo -n '' ntpd''; ntpd ${ntpd_flags} > fi > > > ------------------------------------------------------------------------ > > _______________________________________________ > flashboot mailing list > flashboot at mindrot.org > http://lists.mindrot.org/mailman/listinfo/flashboot >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mindrot.org/pipermail/flashboot/attachments/20060915/4719286f/attachment.html
Jakob Schlyter
2006-Sep-16 13:28 UTC
[flashboot] isakmpd odd behavior and rc.initial normalize
On 15 sep 2006, at 10.52, Massimo Lusetti wrote:> During this process I''ve noticed that settling isakmpd_flags="-4 - > K" in > rc.conf result in a script error by /etc/rc which does not handle > blank > in *_flags variables in some cases so i just made a quick fix > (attached) > normalizing the test cases under rc.initial.patch committed. jakob