mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2025-12-10 00:04:17 +00:00
use eth_broadcast_addr() to assign broadcast address
Using eth_broadcast_addr() to assign broadcast address instead of copying from an array that contains the all-ones broadcast address Port 78adf574c969c14a470b686af8d6bd7e1dcf142b Port 3b0a4a1bdb0f6348dba797a0fa1cf161f5639ded Port 44c26bec861476f89ac5aee0bb19df128a42543b Link: https://lore.kernel.org/r/20210616081243.2511663-4-yangyingliang@huawei.com
This commit is contained in:
@@ -811,7 +811,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
||||
if (*((unsigned char *)&iph->daddr + 3) == 0xff) {
|
||||
/* L2 is unicast but L3 is broadcast, make L2 bacome broadcast */
|
||||
RTW_INFO("NAT25: Set DA as boardcast\n");
|
||||
memset(skb->data, 0xff, ETH_ALEN);
|
||||
eth_broadcast_addr(skb->data);
|
||||
} else {
|
||||
/* forward unknow IP packet to upper TCP/IP */
|
||||
RTW_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
|
||||
Reference in New Issue
Block a user