diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2003-05-13 17:06:05 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2003-05-13 17:06:05 +0000 |
commit | ecd80721b550f01bb7197a5708b86ac25afd05ea (patch) | |
tree | 90884270792c889304052430e57329c0821daf2c /kernel/linux2.5/net/bridge | |
parent | dfab72de51bfc929117eb0bfd8f474d9e2b20096 (diff) |
Chris Vitale <csv_at_bluetail.com>: get rid of magic numbers
Diffstat (limited to 'kernel/linux2.5/net/bridge')
-rw-r--r-- | kernel/linux2.5/net/bridge/netfilter/ebt_802_3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/linux2.5/net/bridge/netfilter/ebt_802_3.c b/kernel/linux2.5/net/bridge/netfilter/ebt_802_3.c index 7535f29..7817805 100644 --- a/kernel/linux2.5/net/bridge/netfilter/ebt_802_3.c +++ b/kernel/linux2.5/net/bridge/netfilter/ebt_802_3.c @@ -17,7 +17,7 @@ static int ebt_filter_802_3(const struct sk_buff *skb, const struct net_device * { struct ebt_802_3_info *info = (struct ebt_802_3_info *)data; struct ebt_802_3_hdr *hdr = (struct ebt_802_3_hdr *)skb->mac.ethernet; - uint16_t type = hdr->llc.ui.ctrl & 0x3 ? hdr->llc.ui.type : hdr->llc.ni.type; + uint16_t type = hdr->llc.ui.ctrl & IS_UI ? hdr->llc.ui.type : hdr->llc.ni.type; if (info->bitmask & EBT_802_3_SAP) { @@ -28,7 +28,7 @@ static int ebt_filter_802_3(const struct sk_buff *skb, const struct net_device * } if (info->bitmask & EBT_802_3_TYPE) { - if (!(hdr->llc.ui.dsap == 0xaa && hdr->llc.ui.ssap == 0xaa)) + if (!(hdr->llc.ui.dsap == CHECK_TYPE && hdr->llc.ui.ssap == CHECK_TYPE)) return EBT_NOMATCH; if (FWINV(info->type != type, EBT_802_3_TYPE)) return EBT_NOMATCH; |