Menu

IP4 subnetmask not checked on input frames?

qwantic
2024-06-06
2024-06-06
  • qwantic

    qwantic - 2024-06-06

    Hi,

    I noticed that if I set a static IP4 address for FNET, say 192.168.2.1, with a subnetmask of 255.255.255.0, I still receive data from ip addresses with a different 3rd ip address octet like 192.168.5.6.

    Looking through the code, I don't see where the subnet mask comes into play for incoming frames (I was looking especially in fnet_ip_input_low() where it seems the check would be if anywhere).

    Just wondering what you thought, or if I missed something.

    thanks!

     
  • Andrej Butok

    Andrej Butok - 2024-06-06

    Should be ok, if the destination adress is our address or a broadcast one.

     
  • qwantic

    qwantic - 2024-06-06

    Thanks, yes. I just realized I was misinterpreting what the subnet mask is actually there for. It's not supposed to filter out source ips that don't match the masked IP4!

     

Log in to post a comment.