On Tue, Mar 27, 2007 at 05:32:57PM +0100, Jon Morby wrote:
> .. and probably me doing something wrong but I can't spot it
> 
> I am trying to setup a native IPv6 BGP session to BT Exact
> 
> I have the interface setup as v6 only
> 
> [EMAIL PROTECTED] cat /etc/hostname.vlan303
> up vlan 303 vlandev trunk0 description UK6x
> inet6 2001:7f8:2:1::21 64
> 
> [EMAIL PROTECTED] cat /etc/hostname.trunk0
> trunkport bge0 trunkport bge1 up
> 
> and can ping their end of the link fine
> 
> [EMAIL PROTECTED] ping6 -c 3 2001:7f8:2:1::1
> PING6(56=40+8+8 bytes) 2001:7f8:2:1::21 --> 2001:7f8:2:1::1
> 16 bytes from 2001:7f8:2:1::1, icmp_seq=0 hlim=64 time=0.367 ms
> 16 bytes from 2001:7f8:2:1::1, icmp_seq=1 hlim=64 time=0.293 ms
> 16 bytes from 2001:7f8:2:1::1, icmp_seq=2 hlim=64 time=0.447 ms
> 
> --- 2001:7f8:2:1::1 ping6 statistics ---
> 3 packets transmitted, 3 packets received, 0.0% packet loss
> round-trip min/avg/max/std-dev = 0.293/0.369/0.447/0.063 ms
> 
> OpenBGPD is configured thusly (500 line bgpd.conf cut down to basic  
> essentials)
> 
> AS 8282
> network 194.70.36.0/24
> network 84.246.192.0/21
> network 80.252.112.0/20
> network 2a01:2c0::/32
> 
> group IPvSix {
>          set nexthop self
>          softreconfig in yes
>          softreconfig out yes
>          set community 8282:600
>          # announce IPv4 none
>          announce IPv6 unicast
> 
>          neighbor 2001:7f8:2:1::1 {
>                  multihop 3
>                  local-address 2001:7f8:2:1::21
>                  remote-as 1752
>          }
> }
> 
> Sessions however won't initiate
> 
> (they've also tried with/without override-capability-neg on their end)
> 
> Mar 27 16:27:46 l3-c1 bgpd[32629]: SE reconfigured
> Mar 27 16:27:55 l3-c1 bgpd[32629]: neighbor 2001:7f8:2:1::1: state  
> change Idle -> Active, reason: Start
> Mar 27 16:27:55 l3-c1 bgpd[32629]: neighbor 2001:7f8:2:1::1:  
> session_setup_socket setsockopt hoplimit: Protocol not available
> Mar 27 16:27:55 l3-c1 bgpd[32629]: neighbor 2001:7f8:2:1::1: state  
> change Active -> Idle, reason: Fatal error
> 
> Their debug output shows the following
> 
> Mar 27 15:36:51.347 BST: BGP: 2001:7F8:2:1::21 open active, local  
> address 2001:7F8:2:1::1
> Mar 27 15:36:51.347 BST: BGPNSF: Building graceful restart capability  
> for 2001:7F8:2:1::21
> Mar 27 15:36:51.347 BST: BGP: 2001:7F8:2:1::21 went from Active to  
> OpenSent
> Mar 27 15:36:51.347 BST: BGP: 2001:7F8:2:1::21 sending OPEN, version  
> 4, my as: 1752, holdtime 360 seconds
> Mar 27 15:36:51.347 BST: BGP: 2001:7F8:2:1::21 send message type 1,  
> length (incl. header) 51
> Mar 27 15:36:51.431 BST: BGP: 2001:7F8:2:1::21 remote close, state  
> CLOSED
> Mar 27 15:36:51.431 BST: BGP: 2001:7F8:2:1::21 -reset the session
> Mar 27 15:36:51.431 BST: BGPNSF state: 2001:7F8:2:1::21 went from  
> nsf_not_active to nsf_not_active
> Mar 27 15:36:51.431 BST: BGP: 2001:7F8:2:1::21 went from OpenSent to  
> Idle
> Mar 27 15:36:51.431 BST: BGP: 2001:7F8:2:1::21 closing
> Mar 27 15:36:51.439 BST: BGP: 2001:7F8:2:1::21 went from Idle to Active
> Mar 27 15:36:51.439 BST: BGP: 2001:7F8:2:1::21 open active delayed  
> 28351ms (35000ms max, 28% jitter)
> 
> I haven't tried restarting bgpd completely as this is on a production  
> server ... but I'm hoping it's just a stupid config error somewhere  
> that can easily resolved ?
> 
> This is on -current as of a week ago
> 
> Any ideas?
> 

Try this diff. It seems to solve the problem for me.

-- 
:wq Claudio

Index: session.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/session.c,v
retrieving revision 1.271
diff -u -p -r1.271 session.c
--- session.c   16 Mar 2007 14:06:57 -0000      1.271
+++ session.c   27 Mar 2007 17:10:07 -0000
@@ -1162,7 +1162,7 @@ session_setup_socket(struct peer *p)
 
        if (p->conf.ebgp && p->conf.remote_addr.af == AF_INET6)
                /* set hoplimit to foreign router's distance */
-               if (setsockopt(p->fd, IPPROTO_IPV6, IPV6_HOPLIMIT, &ttl,
+               if (setsockopt(p->fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl,
                    sizeof(ttl)) == -1) {
                        log_peer_warn(&p->conf,
                            "session_setup_socket setsockopt hoplimit");

Reply via email to