Fix byte order of ether address match for u32
The u32 key match was incorrect byte order when using ether source or destination address matching.
This commit is contained in:
parent
02833d1b38
commit
e3d153c1fb
|
|
@ -448,7 +448,6 @@ static int parse_ether_addr(int *argc_p, char ***argv_p,
|
||||||
char **argv = *argv_p;
|
char **argv = *argv_p;
|
||||||
__u8 addr[6];
|
__u8 addr[6];
|
||||||
int offmask = 0;
|
int offmask = 0;
|
||||||
__u32 key;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (argc < 1)
|
if (argc < 1)
|
||||||
|
|
@ -469,10 +468,8 @@ static int parse_ether_addr(int *argc_p, char ***argv_p,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 6; i += 2) {
|
for (i = 0; i < 6; i++) {
|
||||||
key = *(__u16 *) (addr + i);
|
res = pack_key8(sel, addr[i], 0xFF, off + i, offmask);
|
||||||
|
|
||||||
res = pack_key16(sel, key, 0xFFFF, off + i, offmask);
|
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue