On Thursday 05 July 2007 20:25:50 ext James Chapman wrote:
> Rémi Denis-Courmont wrote:
> > By the way, couldn't encap_type be remove altogether (using two slightly
> > different callbacks for ESP) from udp_sock?
>
> The notion of encap_type is needed for the setsockopt call so it would
> have to stay in the API. If it were removed from udp_sock, getsockopt
> would have to derive the encap_type from encap_rcv funcptr values, which
> would be messy. I think it might complicate the logic in ESP too.

Right. By the way, shouldn't "len" rather be signed in there?

                unsigned int len;

                /* if we're overly short, let UDP handle it */
                len = skb->len - sizeof(struct udphdr);
                if (len <= 0)
                        goto udp;


Regards,

-- 
Rémi Denis-Courmont
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to