diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2021-11-30 10:55:32 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-11-30 20:55:17 +0100 |
commit | 659926bf6ccc614757981dda5ebf51b02aab0050 (patch) | |
tree | 1dd4ab5783260bdbbd10e0211a9bb2eaf8218314 /src | |
parent | b612f69e558bb9dad8140c1d793955e1fb2d9332 (diff) |
filter: HWHDR: re-order KEY_RAW_MAC checks
Currently, in `interp_mac2str` we have:
if (/* KEY_RAW_MAC is valid */) {
/*
* set mac type
*/
}
if (/* mac type is ethernet */)
// parse ethernet
if (/* KEY_RAW_MAC is not valid */)
// return early.
The MAC type will not be set to ethernet unless KEY_RAW_MAC is valid,
so we can move the last check up and drop the first one:
if (/* KEY_RAW_MAC is not valid */)
// return early.
/*
* set mac type
*/
if (/* mac type is ethernet */)
// parse ethernet
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions