New CARP patchset
Matthew George
mdg at secureworks.net
Mon Dec 6 11:51:55 PST 2004
Max Laier wrote:
> All,
>
> again I have put up a new CARP patchset. I have not made as much
> progress as I
> planned to, still there has been some progress and it's worth updating.
> Esp.
> if you are using it with IPv6.
>
> As always the patch is at: http://people.freebsd.org/~mlaier/CARP/
>
> There are two (and a half) issues remaining:
> - VLAN interfaces can't be used as parent interface.
> - ifconfig carpX down/destroy doesn't completely cleanup the parent
> interface (e.g. parent remains PROMISC)
> - "arp_rtrequest: bad gateway ... (!AF_LINK)"
>
> Anything else? Please let me know!
>
I re-cvsup'd RELENG_5 and tried again (second attempt), but I get this
with the new patch set:
FIRST ISSUE:
--------------------------
|diff -urP ../dist/sys/netinet/in_proto.c ./sys/netinet/in_proto.c
|--- ../dist/sys/netinet/in_proto.c Sat Nov 6 21:01:08 2004
|+++ ./sys/netinet/in_proto.c Sat Nov 6 18:13:47 2004
--------------------------
Patching file ./sys/netinet/in_proto.c using Plan A...
Hunk #1 succeeded at 36 (offset 1 line).
Hunk #2 succeeded at 92 with fuzz 2 (offset 1 line).
Hunk #3 failed at 243.
Hunk #4 succeeded at 297 with fuzz 1 (offset -5 lines).
1 out of 4 hunks failed--saving rejects to ./sys/netinet/in_proto.c.rej
Here's the reject:
***************
*** 238,243 ****
&rip_usrreqs
},
#endif /* DEV_PFSYNC */
/* Spacer n-times for loadable protocols. */
IPPROTOSPACER,
IPPROTOSPACER,
--- 243,256 ----
&rip_usrreqs
},
#endif /* DEV_PFSYNC */
+ #ifdef DEV_CARP
+ { SOCK_RAW, &inetdomain, IPPROTO_CARP, PR_ATOMIC|PR_ADDR,
+ carp_input, (pr_output_t*)rip_output, 0, rip_ctloutput,
+ 0,
+ 0, 0, 0, 0,
+ &rip_usrreqs
+ },
+ #endif /* DEV_CARP */
/* Spacer n-times for loadable protocols. */
IPPROTOSPACER,
IPPROTOSPACER,
I also see line offsets in the patch for sys/netinet/if_ether.c but the
patch applies anyway.
SECOND ISSUE:
When I try to build the new ifconfig, it fails:
mdg# cd /usr/src/sbin/ifconfig
mdg# make clean all
rm -f ifconfig ifconfig.o ifmedia.o ifvlan.o ifieee80211.o ifcarp.o
ifmac.o ifpfsync.o ifconfig.8.gz ifconfig.8.cat.gz
cc -O -pipe -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS -DUSE_IEEE80211
-DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wnested-externs -I.. -c
/usr/src/sbin/ifconfig/ifconfig.c
cc -O -pipe -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS -DUSE_IEEE80211
-DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wnested-externs -I.. -c
/usr/src/sbin/ifconfig/ifmedia.c
cc -O -pipe -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS -DUSE_IEEE80211
-DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wnested-externs -I.. -c
/usr/src/sbin/ifconfig/ifvlan.c
cc -O -pipe -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS -DUSE_IEEE80211
-DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wnested-externs -I.. -c
/usr/src/sbin/ifconfig/ifieee80211.c
cc -O -pipe -DUSE_IF_MEDIA -DINET6 -DUSE_VLANS -DUSE_IEEE80211
-DUSE_CARP -DUSE_MAC -DUSE_PFSYNC -DNS -Wall -Wmissing-prototypes
-Wcast-qual -Wwrite-strings -Wnested-externs -I.. -c
/usr/src/sbin/ifconfig/ifcarp.c
/usr/src/sbin/ifconfig/ifcarp.c:222: error: redefinition of 'carp_states'
/usr/src/sbin/ifconfig/ifcarp.c:53: error: previous definition of
'carp_states' was here
/usr/src/sbin/ifconfig/ifcarp.c:226: error: redefinition of 'carp_status'
/usr/src/sbin/ifconfig/ifcarp.c:57: error: previous definition of
'carp_status' was here
/usr/src/sbin/ifconfig/ifcarp.c:253: error: redefinition of 'setcarp_passwd'
/usr/src/sbin/ifconfig/ifcarp.c:84: error: previous definition of
'setcarp_passwd' was here
/usr/src/sbin/ifconfig/ifcarp.c:273: error: redefinition of 'setcarp_vhid'
/usr/src/sbin/ifconfig/ifcarp.c:104: error: previous definition of
'setcarp_vhid' was here
/usr/src/sbin/ifconfig/ifcarp.c:298: error: redefinition of
'setcarp_advskew'
/usr/src/sbin/ifconfig/ifcarp.c:129: error: previous definition of
'setcarp_advskew' was here
/usr/src/sbin/ifconfig/ifcarp.c:320: error: redefinition of
'setcarp_advbase'
/usr/src/sbin/ifconfig/ifcarp.c:151: error: previous definition of
'setcarp_advbase' was here
/usr/src/sbin/ifconfig/ifcarp.c:391: error: redefinition of 'carp_states'
/usr/src/sbin/ifconfig/ifcarp.c:222: error: previous definition of
'carp_states' was here
/usr/src/sbin/ifconfig/ifcarp.c:391: error: redefinition of 'carp_states'
/usr/src/sbin/ifconfig/ifcarp.c:222: error: previous definition of
'carp_states' was here
/usr/src/sbin/ifconfig/ifcarp.c:395: error: redefinition of 'carp_status'
/usr/src/sbin/ifconfig/ifcarp.c:226: error: previous definition of
'carp_status' was here
/usr/src/sbin/ifconfig/ifcarp.c:395: error: redefinition of 'carp_status'
/usr/src/sbin/ifconfig/ifcarp.c:226: error: previous definition of
'carp_status' was here
/usr/src/sbin/ifconfig/ifcarp.c:422: error: redefinition of 'setcarp_passwd'
/usr/src/sbin/ifconfig/ifcarp.c:253: error: previous definition of
'setcarp_passwd' was here
/usr/src/sbin/ifconfig/ifcarp.c:422: error: redefinition of 'setcarp_passwd'
/usr/src/sbin/ifconfig/ifcarp.c:253: error: previous definition of
'setcarp_passwd' was here
/usr/src/sbin/ifconfig/ifcarp.c:442: error: redefinition of 'setcarp_vhid'
/usr/src/sbin/ifconfig/ifcarp.c:273: error: previous definition of
'setcarp_vhid' was here
/usr/src/sbin/ifconfig/ifcarp.c:442: error: redefinition of 'setcarp_vhid'
/usr/src/sbin/ifconfig/ifcarp.c:273: error: previous definition of
'setcarp_vhid' was here
/usr/src/sbin/ifconfig/ifcarp.c:467: error: redefinition of
'setcarp_advskew'
/usr/src/sbin/ifconfig/ifcarp.c:298: error: previous definition of
'setcarp_advskew' was here
/usr/src/sbin/ifconfig/ifcarp.c:467: error: redefinition of
'setcarp_advskew'
/usr/src/sbin/ifconfig/ifcarp.c:298: error: previous definition of
'setcarp_advskew' was here
/usr/src/sbin/ifconfig/ifcarp.c:489: error: redefinition of
'setcarp_advbase'
/usr/src/sbin/ifconfig/ifcarp.c:320: error: previous definition of
'setcarp_advbase' was here
/usr/src/sbin/ifconfig/ifcarp.c:489: error: redefinition of
'setcarp_advbase'
/usr/src/sbin/ifconfig/ifcarp.c:320: error: previous definition of
'setcarp_advbase' was here
/usr/src/sbin/ifconfig/ifcarp.c:560: error: redefinition of 'carp_states'
/usr/src/sbin/ifconfig/ifcarp.c:391: error: previous definition of
'carp_states' was here
/usr/src/sbin/ifconfig/ifcarp.c:560: error: redefinition of 'carp_states'
/usr/src/sbin/ifconfig/ifcarp.c:222: error: previous definition of
'carp_states' was here
/usr/src/sbin/ifconfig/ifcarp.c:564: error: redefinition of 'carp_status'
/usr/src/sbin/ifconfig/ifcarp.c:395: error: previous definition of
'carp_status' was here
/usr/src/sbin/ifconfig/ifcarp.c:564: error: redefinition of 'carp_status'
/usr/src/sbin/ifconfig/ifcarp.c:226: error: previous definition of
'carp_status' was here
/usr/src/sbin/ifconfig/ifcarp.c:591: error: redefinition of 'setcarp_passwd'
/usr/src/sbin/ifconfig/ifcarp.c:422: error: previous definition of
'setcarp_passwd' was here
/usr/src/sbin/ifconfig/ifcarp.c:591: error: redefinition of 'setcarp_passwd'
/usr/src/sbin/ifconfig/ifcarp.c:253: error: previous definition of
'setcarp_passwd' was here
/usr/src/sbin/ifconfig/ifcarp.c:611: error: redefinition of 'setcarp_vhid'
/usr/src/sbin/ifconfig/ifcarp.c:442: error: previous definition of
'setcarp_vhid' was here
/usr/src/sbin/ifconfig/ifcarp.c:611: error: redefinition of 'setcarp_vhid'
/usr/src/sbin/ifconfig/ifcarp.c:273: error: previous definition of
'setcarp_vhid' was here
/usr/src/sbin/ifconfig/ifcarp.c:636: error: redefinition of
'setcarp_advskew'
/usr/src/sbin/ifconfig/ifcarp.c:467: error: previous definition of
'setcarp_advskew' was here
/usr/src/sbin/ifconfig/ifcarp.c:636: error: redefinition of
'setcarp_advskew'
/usr/src/sbin/ifconfig/ifcarp.c:298: error: previous definition of
'setcarp_advskew' was here
/usr/src/sbin/ifconfig/ifcarp.c:658: error: redefinition of
'setcarp_advbase'
/usr/src/sbin/ifconfig/ifcarp.c:489: error: previous definition of
'setcarp_advbase' was here
/usr/src/sbin/ifconfig/ifcarp.c:658: error: redefinition of
'setcarp_advbase'
/usr/src/sbin/ifconfig/ifcarp.c:320: error: previous definition of
'setcarp_advbase' was here
{standard input}: Assembler messages:
{standard input}:323: Error: symbol `carp_states' is already defined
{standard input}:330: Error: symbol `carp_states' is already defined
{standard input}:337: Error: symbol `carp_states' is already defined
*** Error code 1
Stop in /usr/src/sbin/ifconfig.
All of the patches for src/sbin/ifconfig reported success ...
usr.bin/netstat compiles fine ...
--
Matthew George
SecureWorks Technical Operations
404.327.6339
More information about the freebsd-pf
mailing list