lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c85cb4470712160128t7ef525f3md56d05f5990eb81@mail.gmail.com>
Date:	Sun, 16 Dec 2007 11:28:37 +0200
From:	"Ron Rindjunsky" <rindjon@...glemail.com>
To:	"Johannes Berg" <johannes@...solutions.net>
Cc:	linux-wireless <linux-wireless@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>,
	"Michael Wu" <flamingice@...rmilk.net>,
	"Tomas Winkler" <tomasw@...il.com>, "Jouni Malinen" <j@...fi>
Subject: Re: [RFC] mac80211: clean up frame receive handling

> @@ -1150,14 +1148,27 @@ ieee80211_deliver_skb(struct ieee80211_t

> -       if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP
> -           || sdata->type == IEEE80211_IF_TYPE_VLAN) &&
> +       dst = skb->data;
> +
> +       if (compare_ether_addr(dev->dev_addr, dst) == 0)
> +               skb->pkt_type = PACKET_HOST;
> +       else if (is_multicast_ether_addr(dst)) {
> +               if (is_broadcast_ether_addr(dst))
> +                       skb->pkt_type = PACKET_BROADCAST;
> +               else
> +                       skb->pkt_type = PACKET_MULTICAST;
> +       } else
> +               skb->pkt_type = PACKET_OTHERHOST;
> +
> +       if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP ||
> +                                     sdata->type == IEEE80211_IF_TYPE_VLAN) &&

i may miss something, but wouldn't you prefer to use eth_type_trans
here and just add compare_ether_addr check after it?

> @@ -1186,16 +1197,18 @@ ieee80211_deliver_skb(struct ieee80211_t
>
>        if (skb) {
>                /* deliver to local stack */
> -               skb->protocol = eth_type_trans(skb, dev);
>                memset(skb->cb, 0, sizeof(skb->cb));
> +               skb->dev = dev;
> +               skb_reset_mac_header(skb);
> +               skb_pull(skb, ETH_HLEN);
>                netif_rx(skb);
>        }
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ