aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/atm/mpc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 2086396de177..9c7f712fc7e9 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -542,6 +542,13 @@ static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
542 if (eth->h_proto != htons(ETH_P_IP)) 542 if (eth->h_proto != htons(ETH_P_IP))
543 goto non_ip; /* Multi-Protocol Over ATM :-) */ 543 goto non_ip; /* Multi-Protocol Over ATM :-) */
544 544
545 /* Weed out funny packets (e.g., AF_PACKET or raw). */
546 if (skb->len < ETH_HLEN + sizeof(struct iphdr))
547 goto non_ip;
548 skb_set_network_header(skb, ETH_HLEN);
549 if (skb->len < ETH_HLEN + ip_hdr(skb)->ihl * 4 || ip_hdr(skb)->ihl < 5)
550 goto non_ip;
551
545 while (i < mpc->number_of_mps_macs) { 552 while (i < mpc->number_of_mps_macs) {
546 if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN))) 553 if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN)))
547 if ( send_via_shortcut(skb, mpc) == 0 ) /* try shortcut */ 554 if ( send_via_shortcut(skb, mpc) == 0 ) /* try shortcut */