Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICMP Destination Unreachable sent in reply to broadcast message #1518

Closed
AndreasAakesson opened this issue Oct 11, 2017 · 3 comments
Closed

Comments

@AndreasAakesson
Copy link
Contributor

... which it should not.

Wireshark:

26 08:58:33.746878 10.0.0.1 10.0.255.255 UDP 86 57621 → 57621 Len=44
29 08:58:33.750149 10.0.0.14 10.0.0.1 ICMP 70 Destination unreachable (Port unreachable)

Network configuration:

      [ Inet4 ] Network configured
                IP: 		10.0.0.14
                Netmask: 	255.255.255.0
                Gateway: 	10.0.0.1
                DNS Server: 	10.0.0.1

Is it correct that this packet is destined for this stack?

  bool IP4::is_for_me(ip4::Addr dst) const
  {
    return stack_.is_valid_source(dst)
      or (dst | stack_.netmask()) == ADDR_BCAST
      or local_ip() == ADDR_ANY;
  }

This do result in true.

@AndreasAakesson
Copy link
Contributor Author

Another issue I'm having when acting as a router:

    [ Network ] Creating stack for vmxnet3 on eth1
      [ Inet4 ] Bringing up eth1 on CPU 0
      [ Inet4 ] Network configured (00:0c:29:d4:1b:6c)
                IP: 		10.0.2.1
                Netmask: 	255.255.255.0
                Gateway: 	0.0.0.0
                DNS Server: 	0.0.0.0
    [ Network ] Creating stack for vmxnet3 on eth2
      [ Inet4 ] Bringing up eth2 on CPU 0
      [ Inet4 ] Network configured (00:0c:29:d4:1b:76)
                IP: 		10.0.1.1
                Netmask: 	255.255.255.0
                Gateway: 	0.0.0.0
                DNS Server: 	0.0.0.0
     [ Router ] Router created with 2 routes
                10.0.1.0 255.255.255.0 0.0.0.0 eth2 1
                10.0.2.0 255.255.255.0 0.0.0.0 eth1 1

When I from net 10.0.1.x try to ping 10.0.2.255 through the IncludeOS router, eth2 with address 10.0.1.1 replies to the broadcast.

$ ping 10.0.2.255
PING 10.0.2.255 (10.0.2.255) 56(84) bytes of data.
64 bytes from 10.0.1.1: icmp_seq=1 ttl=63 time=0.096 ms

Again, is this correct behavior that is_for_me returns true in this case?
Is it correct that (dst | stack_.netmask()) == ADDR_BCAST only checks if it's a broadcast, not if it's a broadcast on my net?

@fwsGonzo fwsGonzo added this to the v0.13 milestone Jan 2, 2018
@AndreasAakesson
Copy link
Contributor Author

This is also happening even when the interface isn't yet configured.

270 09:42:04.195197 10.0.0.1 10.0.0.255 UDP 86 57621 → 57621 Len=44
271 09:42:04.195581 0.0.0.0 10.0.0.1 ICMP 70 Destination unreachable (Port unreachable)

AndreasAakesson added a commit to AndreasAakesson/IncludeOS that referenced this issue Sep 11, 2018
@AndreasAakesson
Copy link
Contributor Author

Seems like 196e7be fixed this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants