- memcpy(eh->eth_src, eth_key->eth_src, sizeof eh->eth_src);
- memcpy(eh->eth_dst, eth_key->eth_dst, sizeof eh->eth_dst);
+ if (eh) {
+ memcpy(eh->eth_src, eth_key->eth_src, sizeof eh->eth_src);
+ memcpy(eh->eth_dst, eth_key->eth_dst, sizeof eh->eth_dst);
+ }