AF_INET SOCK_RAW questions.

From: Me Registered
Date: Wed Sep 17 2014 - 16:33:32 EST


Hello,

While "reading" the kernel sources referring to AF_INET SOCK_RAW
sockets, i have stumbled upon some particular issues:

* in raw_icmp_error. why is the marked line required?
290 raw_err(raw_sk, skb, info);
291 raw_sk = sk_next(raw_sk);
*292 iph = (const struct iphdr *)skb->data; // <<<<<<
293 }
294 }

looking over raw_err, the skb is not changed and i don't think that it
is meant to since that means delivering different thinks to different
sockets, while iterating. (i have tracked this line back to
2.4.3.2->2.4.3.3).

* also in raw_bind:
why is there no lock_sock/release_sock while changing socket
attributes (like in rawv6_bind)?

Thanks,
Bogdan B.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/