Bug 29726

Summary: IPv6 and default route issues with PPP/PPPoE
Product: Base System Reporter: Sameh Ghane <sw>
Component: binAssignee: Brian Somers <brian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description Sameh Ghane 2001-08-15 11:20:01 UTC
	At the end of the PPP negociation, ppp doesn't add the default route. When killing ppp, it also appears that removal of IPv6 routes fails.

Here is the ppp log of connection:

Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: set dial 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: set login 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: add default HISADDR 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: enable dns 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: enable tcpmssfixup 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: set speed sync 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: set ctsrts off 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: default: enable lqr 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: nerim: set authname sameh@net1.nerim.fsa 
Aug 15 12:00:12 core ppp[23850]: tun0: Command: nerim: set authkey ******** 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: PPP Started (ddial mode). 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: bundle: Establish 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: deflink: closed -> opening 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: deflink: Connected! 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: deflink: opening -> dial 
Aug 15 12:00:12 core ppp[23851]: tun0: Phase: deflink: dial -> carrier 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: Received NGM_PPPOE_SUCCESS (hook "tun0") 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: deflink: carrier -> login 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: deflink: login -> lcp 
Aug 15 12:00:16 core ppp[23851]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: bundle: Authenticate 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: deflink: his = CHAP 0x05, mine = none 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from BSBGN103) 
Aug 15 12:00:16 core ppp[23851]: tun0: Phase: Chap Output: RESPONSE (sameh@net1.nerim.fsa) 
Aug 15 12:00:18 core ppp[23851]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: deflink: his = CHAP 0x05, mine = none 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from NERIM) 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: Chap Output: RESPONSE (sameh@net1.nerim.fsa) 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: Chap Input: SUCCESS 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: FSM: Using "deflink" as a transport 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: deflink: State change Initial --> Closed 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: deflink: LayerStart. 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: MPPE: Not usable without CHAP81 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: deflink: SendConfigReq(1) state = Closed 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP:  DEFLATE[4] win 15 
Aug 15 12:00:18 core ppp[23851]: tun0: CCP:  PRED1[2]  
Aug 15 12:00:18 core ppp[23851]: tun0: CCP: deflink: State change Closed --> Req-Sent 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: deflink: lcp -> open 
Aug 15 12:00:18 core ppp[23851]: tun0: Phase: bundle: Network 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP: FSM: Using "deflink" as a transport 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP: deflink: State change Initial --> Closed 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP: deflink: LayerStart. 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP: deflink: SendConfigReq(1) state = Closed 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP:  IPADDR[6]  10.0.0.1 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP:  COMPPROTO[6]  16 VJ slots with slot compression 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP:  PRIDNS[6]  62.4.17.109 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP:  SECDNS[6]  255.255.255.255 
Aug 15 12:00:18 core ppp[23851]: tun0: IPCP: deflink: State change Closed --> Req-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: RecvConfigReq(1) state = Req-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  194.206.78.3 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: SendConfigAck(1) state = Req-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  194.206.78.3 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: CCP: deflink: State change Req-Sent --> Stopped 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  COMPPROTO[6]  16 VJ slots with slot compression 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  10.0.0.1 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  PRIDNS[6]  62.4.17.109 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  SECDNS[6]  255.255.255.255 
Aug 15 12:00:19 core ppp[23851]: tun0: Phase: deflink: IPV6CP protocol reject closes IPV6CP ! 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  62.4.18.12 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  changing address: 10.0.0.1  --> 62.4.18.12 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  PRIDNS[6]  62.4.16.70 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  SECDNS[6]  62.4.17.109 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: Primary nameserver set to 62.4.16.70 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: Secondary nameserver set to 62.4.17.109 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: SendConfigReq(3) state = Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  IPADDR[6]  62.4.18.12 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  PRIDNS[6]  62.4.16.70 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP:  SECDNS[6]  62.4.17.109 
Aug 15 12:00:19 core ppp[23851]: tun0: Phase: deflink: IPV6CP protocol reject closes IPV6CP ! 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: RecvConfigAck(3) state = Ack-Sent 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: State change Ack-Sent --> Opened 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: deflink: LayerUp. 
Aug 15 12:00:19 core ppp[23851]: tun0: IPCP: myaddr 62.4.18.12 hisaddr = 194.206.78.3 
Aug 15 12:00:22 core ppp[23851]: tun0: Phase: deflink: IPV6CP protocol reject closes IPV6CP ! 
Aug 15 12:00:31 core last message repeated 3 times

Here is the routing table, *before* connecting:
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
62.4.21.188        ff:ff:ff:ff:ff:ff  UHLWb       0       12    ed0 =>
62.4.21.188/30     link#1             UC          2        0    ed0
62.4.21.191        ff:ff:ff:ff:ff:ff  UHLWb       0        3    ed0
127.0.0.1          127.0.0.1          UH          2      269    lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::1                               ::1                           UH          lo0
fe80::%ed0/64                     link#1                        UC          ed0
fe80::280:c8ff:fef2:dc34%ed0      0:80:c8:f2:dc:34              UHL         lo0
fe80::%xl0/64                     link#2                        UC          xl0
fe80::204:76ff:fe11:d475%xl0      0:4:76:11:d4:75               UHL         lo0
fe80::%lo0/64                     fe80::1%lo0                   Uc          lo0
fe80::1%lo0                       link#3                        UHL         lo0
ff01::/32                         ::1                           U           lo0
ff02::%ed0/32                     link#1                        UC          ed0
ff02::%xl0/32                     link#2                        UC          xl0
ff02::%lo0/32                     ::1                           UC          lo0
ff02::%tun0/32                    fe80::280:c8ff:fef2:dc34%tun0 UC         tun0

And *after* connecting, I get this routes added:

194.206.78.3       62.4.18.12         UH          0        0   tun0

fe80::%tun0/64                    fe80::280:c8ff:fef2:dc34%tun0 Uc         tun0
fe80::280:c8ff:fef2:dc34%tun0     link#6                        UHL         lo0

No default route.

Also, when killing ppp, here is the log:

Aug 15 11:59:26 core ppp[23791]: tun0: Phase:  total 37 bytes/sec, peak 190 bytes/sec on Wed Aug 15 11:59:26 2001 
Aug 15 11:59:26 core ppp[23791]: tun0: Phase: deflink: hangup -> closed 
Aug 15 11:59:26 core ppp[23791]: tun0: Warning: Del route failed: ff02::%tun0/32: Non-existent 
Aug 15 11:59:26 core ppp[23791]: tun0: Phase: bundle: Dead 
Aug 15 11:59:26 core ppp[23791]: tun0: Phase: PPP Terminated (normal). 
Aug 15 11:59:26 core ppp[23791]: tun0: Warning: Del route failed: ff02::%tun0/32: Non-existent

Fix: 

Add a default route manually :)
How-To-Repeat: 	Use PPPoE to connect to a DSL provider with a new -current.
Comment 1 Brian Somers freebsd_committer freebsd_triage 2001-08-15 12:50:15 UTC
Responsible Changed
From-To: freebsd-bugs->brian

This is my fault
Comment 2 Brian Somers freebsd_committer freebsd_triage 2001-08-15 13:49:25 UTC
State Changed
From-To: open->closed

Fixed in route.c v 1.73.