freebsd-nq/sys/net
Qing Li 1a41f91052 Assuming the interface has an address of x.x.x.195, a mask of
255.255.255.0, and a default route with gateway x.x.x.1. Now if
the address mask is changed to something more specific, e.g.,
255.255.255.128, then after the mask change the default gateway
is no longer reachable.

Since the default route is still present in the routing table,
when the output code tries to resolve the address of the default
gateway in function rt_check(), again, the default route will be
returned by rtalloc1(). Because the lock is currently held on the
rtentry structure, one more attempt to hold the lock will trigger
a crash due to "lock recursed on non-recursive mutex ..."

This is a general problem. The fix checks for the above condition
so that an existing route entry is not mistaken for a new cloned
route. Approriately, an ENETUNREACH error is returned back to the
caller

Approved by:	andre
2006-06-05 21:20:21 +00:00
..
bpf_compat.h
bpf_filter.c Avoid unwanted sign extension of indexed byte load in bpf code. 2006-05-28 20:00:02 +00:00
bpf_jitter.c
bpf_jitter.h
bpf.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
bpf.h Back out previous two commits, this caused some problems in the namespace 2006-06-03 18:48:14 +00:00
bpfdesc.h Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
bridgestp.c
bsd_comp.c
ethernet.h
fddi.h
firewire.h
if_arc.h Use ANSI C function protypes and declarations for if_arcsubr. 2006-04-12 07:44:31 +00:00
if_arcsubr.c Use ANSI C function protypes and declarations for if_arcsubr. 2006-04-12 07:44:31 +00:00
if_arp.h
if_atm.h
if_atmsubr.c
if_bridge.c Fix style(9) nits, whitespace and parentheses. 2006-05-16 22:50:41 +00:00
if_bridgevar.h
if_clone.c
if_clone.h
if_disc.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_dl.h
if_ef.c
if_ethersubr.c
if_faith.c add missed calls to bpf_peers_present 2006-06-02 23:14:40 +00:00
if_fddisubr.c
if_fwsubr.c add missed calls to bpf_peers_present 2006-06-02 23:14:40 +00:00
if_gif.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_gif.h
if_gre.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_gre.h
if_iso88025subr.c
if_llc.h
if_loop.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_media.c
if_media.h - Add definition for IFM_10G_CX4. 2006-06-02 07:50:58 +00:00
if_mib.c
if_mib.h
if_ppp.c
if_ppp.h
if_pppvar.h
if_sl.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_slvar.h
if_sppp.h
if_spppfr.c
if_spppsubr.c
if_stf.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_stf.h
if_tap.c Revert the (int *) -> (intptr_t *) conversion done as part of rev. 1.59 2006-05-30 20:08:12 +00:00
if_tap.h
if_tapvar.h
if_tun.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
if_tun.h
if_types.h
if_var.h
if_vlan_var.h
if_vlan.c
if.c Announce all interfaces to devd on attach/detach. This adds a new devctl 2006-06-01 00:41:07 +00:00
if.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
iso88025.h
net_osdep.h Remove ip6fw. Since ipfw has full functional IPv6 support now and - in 2006-05-12 20:39:23 +00:00
netisr.c
netisr.h
pfil.c
pfil.h
pfkeyv2.h
ppp_comp.h
ppp_deflate.c
ppp_defs.h
ppp_tty.c
radix.c
radix.h
raw_cb.c raw_disconnect() now disconnects but does not detach the raw pcb. As a 2006-06-02 08:27:15 +00:00
raw_cb.h
raw_usrreq.c raw_disconnect() now disconnects but does not detach the raw pcb. As a 2006-06-02 08:27:15 +00:00
route.c Assuming the interface has an address of x.x.x.195, a mask of 2006-06-05 21:20:21 +00:00
route.h
rtsock.c Chance protocol switch method pru_detach() so that it returns void 2006-04-01 15:42:02 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c
zlib.h