Skip to content

Commit

Permalink
Fix crash with "ether dst 1::2" as a filter.
Browse files Browse the repository at this point in the history
Report an error, rather than crashing, if an IPv6 address is used for
link-layer filtering.
  • Loading branch information
guyharris committed Nov 10, 2013
1 parent 78bd68e commit c513a47
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gencode.c
Expand Up @@ -4573,6 +4573,9 @@ gen_host6(addr, mask, proto, dir, type)
case Q_DEFAULT:
return gen_host6(addr, mask, Q_IPV6, dir, type);

case Q_LINK:
bpf_error("link-layer modifier applied to ip6 %s", typestr);

case Q_IP:
bpf_error("'ip' modifier applied to ip6 %s", typestr);

Expand Down

0 comments on commit c513a47

Please sign in to comment.