--- zzzz-none-000/linux-4.4.271/include/net/neighbour.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/net/neighbour.h 2023-04-19 10:22:30.000000000 +0000 @@ -232,6 +232,11 @@ return p->tbl->family; } +struct neigh_mac_update { + unsigned char old_mac[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; + unsigned char update_mac[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; +}; + #define NEIGH_PRIV_ALIGN sizeof(long long) #define NEIGH_ENTRY_SIZE(size) ALIGN((size), NEIGH_PRIV_ALIGN) @@ -263,8 +268,10 @@ const u32 *n32 = (const u32 *)n->primary_key; const u32 *p32 = pkey; - return ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) | - (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0; + return ((n32[0] ^ net_hdr_word(&p32[0])) | + (n32[1] ^ net_hdr_word(&p32[1])) | + (n32[2] ^ net_hdr_word(&p32[2])) | + (n32[3] ^ net_hdr_word(&p32[3]))) == 0; } static inline struct neighbour *___neigh_lookup_noref( @@ -361,6 +368,9 @@ void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); +extern void neigh_mac_update_register_notify(struct notifier_block *nb); +extern void neigh_mac_update_unregister_notify(struct notifier_block *nb); + struct neigh_seq_state { struct seq_net_private p; struct neigh_table *tbl;