Skip to content

Commit

Permalink
Merge pull request #5 from AKNoryx28/master
Browse files Browse the repository at this point in the history
Drop IPX and Apple talk suport kernel >= 5.15
  • Loading branch information
juanro49 committed Feb 23, 2022
2 parents 6ae8c28 + cba2f47 commit 2c374f4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/rtw_br_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
#define _RTW_BR_EXT_C_

#ifdef __KERNEL__
#include <linux/version.h>
#include <linux/if_arp.h>
#include <net/ip.h>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
#include <net/ipx.h>
#include <linux/atalk.h>
#endif
#include <linux/udp.h>
#include <linux/if_pppox.h>
#endif
Expand Down Expand Up @@ -169,6 +172,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
}


#ifdef _NET_INET_IPX_H_
static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
{
Expand Down Expand Up @@ -200,6 +204,7 @@ static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networ
memcpy(networkAddr + 1, (unsigned char *)network, 2);
networkAddr[3] = *node;
}
#endif


static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
Expand Down Expand Up @@ -329,6 +334,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)

x = networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];

#ifdef _NET_INET_IPX_H_
return x & (NAT25_HASH_SIZE - 1);
} else if (networkAddr[0] == NAT25_IPX) {
unsigned long x;
Expand All @@ -348,6 +354,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)

x = networkAddr[0] ^ networkAddr[1] ^ networkAddr[2] ^ networkAddr[3] ^ networkAddr[4] ^ networkAddr[5] ^ networkAddr[6] ^ networkAddr[7] ^ networkAddr[8];

#endif
return x & (NAT25_HASH_SIZE - 1);
}
#ifdef CL_IPV6_PASS
Expand Down Expand Up @@ -889,6 +896,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
}
}

#ifdef _NET_INET_IPX_H_
/*---------------------------------------------------*/
/* Handle IPX and Apple Talk frame */
/*---------------------------------------------------*/
Expand Down Expand Up @@ -1109,6 +1117,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)

return -1;
}
#endif

/*---------------------------------------------------*/
/* Handle PPPoE frame */
Expand Down

0 comments on commit 2c374f4

Please sign in to comment.