Hi,
In some cases, we may be generating packets with a source address that
qualifies as martian. This can happen when we're in the middle of setting
up or tearing down the network, and netfilter decides to reject a packet
with an RST. The routing code would detect the martian, and try to
print a warning. This would oops, because locally generated packets do
not have a valid skb->mac.raw pointer at this point.
I didn't actually investigate why netfilter was generating an RST with
invalid IP source, but from what it looked like, the system was in the
middle of some interface setup/teardown.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
From: Olaf Kirch <[EMAIL PROTECTED]>
Subject: [IPv4] Prevent oops when printing martian source
In some cases, we may be generating packets with a source address that
qualifies as martian. This can happen when we're in the middle of setting
up the network, and netfilter decides to reject a packet with an RST.
The IPv4 routing code would try to print a warning and oops, because
locally generated packets do not have a valid skb->mac.raw pointer
at this point.
Index: linux-2.6.5/net/ipv4/route.c
===================================================================
--- linux-2.6.5.orig/net/ipv4/route.c 2004-03-12 12:17:31.000000000 +0100
+++ linux-2.6.5/net/ipv4/route.c 2005-04-28 11:52:23.000000000 +0200
@@ -1823,7 +1823,7 @@ martian_source:
printk(KERN_WARNING "martian source %u.%u.%u.%u from "
"%u.%u.%u.%u, on dev %s\n",
NIPQUAD(daddr), NIPQUAD(saddr), dev->name);
- if (dev->hard_header_len) {
+ if (dev->hard_header_len && skb->mac.raw) {
int i;
unsigned char *p = skb->mac.raw;
printk(KERN_WARNING "ll header: ");