Explorar o código

Kernel: Ignore IPv6 packets; log unknown Ethernet payload types

Conrad Pankoff %!s(int64=6) %!d(string=hai) anos
pai
achega
5f86a979ea
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  1. 1 0
      Kernel/Net/EtherType.h
  2. 5 0
      Kernel/Net/NetworkTask.cpp

+ 1 - 0
Kernel/Net/EtherType.h

@@ -6,5 +6,6 @@ struct EtherType {
     enum : u16 {
         ARP = 0x0806,
         IPv4 = 0x0800,
+        IPv6 = 0x86DD,
     };
 };

+ 5 - 0
Kernel/Net/NetworkTask.cpp

@@ -126,6 +126,11 @@ void NetworkTask_main()
         case EtherType::IPv4:
             handle_ipv4(eth, packet.size());
             break;
+        case EtherType::IPv6:
+            // ignore
+            break;
+        default:
+            kprintf("NetworkTask: Unknown ethernet type %#04x\n", eth.ether_type());
         }
     }
 }