lkml.org 
[lkml]   [2004]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2.6.3-bk7] Allow ebtables module to change protocol in netif_receive_skb
    Date
    From
    Currently skb->protocol is read before the bridge is called, even though
    it's not used until after. Hence if an ebtables module changes the
    protocol of a frame the wrong protocol is interpreted.

    Simon Barber

    --- linux-2.6.3-bk7.orig/net/core/dev.c 2004-02-25 04:19:07.000000000
    -0800
    +++ linux-2.6.3-bk7/net/core/dev.c 2004-02-25 06:42:11.000000000
    -0800
    @@ -1725,7 +1725,7 @@
    {
    struct packet_type *ptype, *pt_prev;
    int ret = NET_RX_DROP;
    - unsigned short type = skb->protocol;
    + unsigned short type;

    if (!skb->stamp.tv_sec)
    do_gettimeofday(&skb->stamp);
    @@ -1759,6 +1759,7 @@
    if (__handle_bridge(skb, &pt_prev, &ret))
    goto out;

    + type = skb->protocol;
    list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type)&15],
    list) {
    if (ptype->type == type &&
    (!ptype->dev || ptype->dev == skb->dev)) {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.024 / U:62.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site