Date: Fri, 05 Jan 2018 02:08:20 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 224920] limited broadcast for Linux programs Message-ID: <bug-224920-8@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224920 Bug ID: 224920 Summary: limited broadcast for Linux programs Product: Base System Version: 11.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: henry.hu.sh@gmail.com Limited broadcast, or sending to 255.255.255.255, is the behavior specified in RFC 947, which is deprecated (https://wiki.freebsd.org/NetworkRFCCompliance). As a result, FreeBSD does not support it (sending to 255.255.255.255 results in an ether address of the default gw), unless IP_ONESBCAST is specified. However, for Linux programs, it seems to be still expected to work. Some programs send UDP packets to 255.255.255.255 to discover devices on local network. One such example is Canon's ScanGear MP program, which uses this way to discover local scanners. Sample trace: 21:06:37.887917 b0:6e:bf:2a:e7:23 > 04:a1:51:15:5e:11, ethertype IPv4 (0x0800), length 166: 192.168.1.126.51201 > 255.255.255.255.161: C="canon_admin" GetRequest(104) .1.3.6.1.4.1.1602.1.3.1.13.0 .1.3.6.1.4.1.1602.1.2.1.8.1.3.1.1 .1.3.6.1.4.1.1602.1.1.1.1.0 .1.3.6.1.4.1.1602.1.1.1.10.0 .1.3.6.1.4.1.1602.1.3.1.12.0 Expected: 21:05:46.430205 b0:6e:bf:2a:e7:23 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 166: 192.168.1.126.44951 > 255.255.255.255.161: C="canon_admin" GetRequest(104) .1.3.6.1.4.1.1602.1.3.1.13.0 .1.3.6.1.4.1.1602.1.2.1.8.1.3.1.1 .1.3.6.1.4.1.1602.1.1.1.1.0 .1.3.6.1.4.1.1602.1.1.1.10.0 .1.3.6.1.4.1.1602.1.3.1.12.0 Since FreeBSD does not support this, this program cannot discover any devices. The discovery code is in some binary blob, which is unable to be changed. For a closer emulation of Linux behavior, I suggest that when running Linux programs, we send a broadcast packet to the interface of the default route. A workaround is letting ipfw do a forward: fwd 192.168.1.255 udp from me to 255.255.255.255 -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224920-8>
