Mailing List Archive

bgpd can't bind to an interface (ipv6)
Hello

I got a bug report for the Quagga packages which I package for Debian.
Maybe you can help here as I have no experience with ipv6 yet.

bye,

-christian-

On Fri, Dec 05, 2003 at 10:26:51AM +0100, Bastian Blank wrote:
> On Fri, Dec 05, 2003 at 09:56:36AM +0100, Christian Hammers wrote:
> > > | 2003/12/04 21:50:06 BGP: bind to interface ovpn6zseries failed
> > > | 2003/12/04 21:50:07 BGP: bind to interface ovpn6thinkmo failed
> >
> > Oh, bgpd in genereal can. Works fine on my computer, so it's a special
> > problem with your interfaces.
>
> maybe you don't specified a interface for the peers?
>
> its a permission problem, CAP_NET_BIND_SERVICE don't allow to bind to a
> specified interface which is required for link-local links.
>
> | setsockopt(9, SOL_SOCKET, 0x19 /* SO_??? */, "ovpn6thinkmo\0\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\220\0223@"..., 32) = -1 EPERM (Operation not permitted)
> /usr/include/asm/socket.h:
> | #define SO_BINDTODEVICE 25
>
> > The names seem strange? Did you just
> > rename two ethernet ipv4 interfaces or of what kind are yours?
>
> no, the names are valid.
>
> > Can you send me the output of "ip addr"/"ifconfig -a"?
>
> | $ ip addr show ovpn6thinkmo
> | 6: ovpn6thinkmo: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1300 qdisc pfifo_fast qlen 10
> | link/ppp
> | inet 10.0.1.1/32 scope global ovpn6thinkmo
> | inet6 2001:658:215:ffff::1/128 scope global
> | $ ip addr show ovpn6zseries
> | 7: ovpn6zseries: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1300 qdisc pfifo_fast qlen 10
> | link/ppp
> | inet6 fe80::c0a8:ca01/128 scope link
>
> > Or can it be that you have an old instance of Quagga/Zebra still
> > running? Or try to use bgpd and bgpd6 simultaneously in a wrong way?
>
> | $ l /usr/lib/quagga/bgpd*
> | -rwxr-xr-x 1 root root 786356 Nov 16 14:56 /usr/lib/quagga/bgpd*
>
> bgpd6? bgpd does v6. also i killed the old services by hand, so they
> don't run.
>
> >
> > bye,
> >
> > -christian-
> >
>
> --
> We'll pivot at warp 2 and bring all tubes to bear, Mr. Sulu!



--
Christian Hammers WESTEND GmbH | Internet-Business-Provider
Technik CISCO Systems Partner - Authorized Reseller
Lütticher Straße 10 Tel 0241/701333-11
ch@westend.com D-52064 Aachen Fax 0241/911879
Re: bgpd can't bind to an interface (ipv6) [ In reply to ]
On Fri, Dec 05, 2003 at 10:49:37AM +0100, Christian Hammers wrote:
> > its a permission problem, CAP_NET_BIND_SERVICE don't allow to bind to a
> > specified interface which is required for link-local links.
> >
> > | setsockopt(9, SOL_SOCKET, 0x19 /* SO_??? */, "ovpn6thinkmo\0\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\220\0223@"..., 32) = -1 EPERM (Operation not permitted)
> > /usr/include/asm/socket.h:
> > | #define SO_BINDTODEVICE 25

i attached a patch which fixes this problem.
SO_BINDTODEVICE needs CAP_NET_RAW, so i add this capability to the list.

christian: the i386 build have capabilities enabled, so it failes.

bastian

--
Ahead warp factor one, Mr. Sulu.