diff --git a/tc/p_eth.c b/tc/p_eth.c index ad3e28f8..2d2f96ca 100644 --- a/tc/p_eth.c +++ b/tc/p_eth.c @@ -34,6 +34,9 @@ parse_eth(int *argc_p, char ***argv_p, if (argc < 2) return -1; + if (!sel->extended) + return -1; + tkey->htype = TCA_PEDIT_KEY_EX_HDR_TYPE_ETH; if (strcmp(*argv, "type") == 0) { diff --git a/tc/p_udp.c b/tc/p_udp.c index a56a1b51..3916d958 100644 --- a/tc/p_udp.c +++ b/tc/p_udp.c @@ -34,6 +34,9 @@ parse_udp(int *argc_p, char ***argv_p, if (argc < 2) return -1; + if (!sel->extended) + return -1; + tkey->htype = TCA_PEDIT_KEY_EX_HDR_TYPE_UDP; if (strcmp(*argv, "sport") == 0) {