Skip to content

Commit

Permalink
removed unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
beraldoleal committed Jul 10, 2013
1 parent fbe3d60 commit 0915302
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,17 @@ char *get_ipv6_protocol(struct sk_buff *skb)
*/
char *get_ip_protocol(struct sk_buff *skb)
{

struct net_device *dev = skb->dev;
struct ethhdr *eth;

eth = eth_hdr(skb);
switch (ntohs(eth->h_proto)) {
case ETH_P_IP:
return get_ipv4_protocol(skb);
case ETH_P_IPV6:
return get_ipv6_protocol(skb);
default:
break;
}
eth = eth_hdr(skb);
switch (ntohs(eth->h_proto)) {
case ETH_P_IP:
return get_ipv4_protocol(skb);
case ETH_P_IPV6:
return get_ipv6_protocol(skb);
default:
break;
}
return "unknow1";
}

Expand Down

0 comments on commit 0915302

Please sign in to comment.