1 Index: libpcap-0.9.4/nametoaddr.c
2 ===================================================================
3 --- libpcap-0.9.4.orig/nametoaddr.c 2007-06-04 13:22:03.499323304 +0200
4 +++ libpcap-0.9.4/nametoaddr.c 2007-06-04 13:22:03.986249280 +0200
6 e = ep = (u_char *)malloc(6);
10 + if (*s == ':' || *s == '.')
13 if (isxdigit((unsigned char)*s)) {
14 Index: libpcap-0.9.4/scanner.l
15 ===================================================================
16 --- libpcap-0.9.4.orig/scanner.l 2007-06-04 13:22:03.506322240 +0200
17 +++ libpcap-0.9.4/scanner.l 2007-06-04 13:22:03.987249128 +0200
19 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
20 B ([0-9A-Fa-f][0-9A-Fa-f]?)
21 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
27 {N} { yylval.i = stoi((char *)yytext); return NUM; }
28 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
29 yylval.s = sdup((char *)yytext); return HID; }
30 -{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
31 +({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext);
38 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
39 +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
40 icmptype { yylval.i = 0; return NUM; }
41 icmpcode { yylval.i = 1; return NUM; }
42 icmp-echoreply { yylval.i = 0; return NUM; }