summaryrefslogtreecommitdiff
path: root/src/ipcpd/eth/eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/eth/eth.c')
-rw-r--r--src/ipcpd/eth/eth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c
index 9bbadf91..90143d2f 100644
--- a/src/ipcpd/eth/eth.c
+++ b/src/ipcpd/eth/eth.c
@@ -1106,6 +1106,10 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
memcpy(ifr.ifr_name, conf->dev, strlen(conf->dev));
#ifdef BUILD_ETH_DIX
+ if (conf->ethertype < 0x0600 || conf->ethertype == 0xFFFF) {
+ log_err("Invalid Ethertype.");
+ return -1;
+ }
eth_data.ethertype = htons(conf->ethertype);
#endif