a few fixes for network problems

Li, Qing qing.li at bluecoat.com
Fri Aug 28 07:33:15 UTC 2009


Please apply the patch at

	http://people.freebsd.org/~qingli/patch-8-27-net.diff

This patch fixes the following issue 
(some referenced in http://wiki.freebsd.org/8.0TODO)

1. RTM_CHANGE in net/rtsock.c can incorrectly set RTF_GATEWAY

I went through the implementation for the various utilities
(route, arp, ndp, ppp etc.) on how the routing commands
and the associated parameters are packaged and issued. In addition,
having reviewed the discussion thread that took place a couple of
months on this subject, I decided the best way to address this
category of problems is to fix the routing socket command handler
in rtsock.c.

So this patch should address the if_tun interface route issue, where
the route entry for the tunnel end points has the "G" (gateway) 
flag bit set.

Joe Marcus helped me verify the patch for ppp. I performed unit 
testing for the if_tun case as described in the recent bug
report. I also performed the tests where I issued various "route" 
command, specifically, I issued 

   "route change 192.168.1.2 192.168.1.1 -mtu 1400" 

on a tunnel route (192.168.1.2 is the remote end, and 192.168.1.1 is
the local end of the tunnel), and the patch produces the expected 
result.


2. flowtable mishandles gateway (G) routes on POINT2POINT interfaces

This problem was reported last Wednesday, which I responded to on the 
mailing list before my trip. The flow-table code should not try to cache

L2/L3 info if the interface type is of IFF_POINTOPOINT or IFF_LOOPBACK 
type. The code can be optimized to reduce the number of calls to
rtalloc(), 
but I will postpone those changes to post 8.0 release.

Excessive message of "IPv4 address: \"%s\" is not on the network"
was triggered by the above bug and should be fixed by this patch.
Also, the panic seen in if_tun output function should also be fixed.


3. reproducible panic under load on BETA-3

ip_output() should not try to free a LLE entry from the route
cache if that route cache was not initialized by the flow-table.
ro_lle field in the LLE entry is valid only if it came from the
flow-table.

Please apply the patch and let me know if these issues have been 
Addressed.

Thanks,

-- Qing


> -----Original Message-----
> From: owner-freebsd-current at freebsd.org [mailto:owner-freebsd-
> current at freebsd.org] On Behalf Of Denis Ahrens
> Sent: Wednesday, August 19, 2009 12:59 AM
> To: freebsd-current at freebsd.org
> Subject: network problems
> 
> Hi
> 
> After installing the latest CURRENT from today I see strange network
> problems.
> 
> The problems are similar to
http://lists.freebsd.org/pipermail/freebsd-
> current/2009-August/010287.html
> 
> I see alot of this in the log:
> 
> Aug 19 09:33:39 monolith kernel: IPv4 address: "213.191.89.1" is not
> on the network
> Aug 19 09:33:57 monolith last message repeated 22 times
> Aug 19 09:36:07 monolith last message repeated 6 times
> Aug 19 09:38:19 monolith last message repeated 15 times
> 
> 213.191.89.1 is my ppp endpoint:
> 
> tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
> 	inet 85.178.62.185 --> 213.191.89.1 netmask 0xffffffff
> 	Opened by PID 1351
> 
> When I try to ping the address the machine panics!
> (something with sin_family and in_lltable_lookup)
> http://denisy.dyndns.org/panic.jpg
> 
> While restarting the ppp daemon I see this in the logs:
> 
> Aug 19 09:33:33 monolith kernel: tun0: link state changed to UP
> Aug 19 09:33:38 monolith ppp[1351]: tun0: Warning: 0.0.0.0: Change
> route failed: errno: No such process
> 
> I don't know if it is related at all.
> 
> netstat -rn
> 
> Internet:
> Destination        Gateway            Flags    Refs      Use  Netif
> Expire
> default            213.191.89.1       UGS         0    12579   tun0
> 10.1.2.0/24        link#1             U           2    18778    re0
> 10.1.2.1           link#4             UHS         0        0    lo0
> 85.178.62.185      link#4             UHS         0        0    lo0
> 127.0.0.1          link#4             UH          0       87    lo0
> 213.191.89.1       link#5             UGHS        0        0   tun0
> 
> Denis
> 
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-
> unsubscribe at freebsd.org"


More information about the freebsd-net mailing list