Commit Graph

13 Commits

Author SHA1 Message Date
Evgeny Sinelnikov
8c1beeb584 DHCP: fixed timeout for DISCOVER request 2018-08-22 20:08:23 +04:00
Arseny Maslennikov
6ce39ab483 dhcp.c: Remove temporary default route properly
DHCP is implemented in propagator in a rather lazy way:
to dynamically configure a network interface, say `eno1',
instead of slinging raw Ethernet frames around like everyone else,
it sets up a (temporary) default null route through that interface
and throws UDP messages with actual bootp payload.

`ip' utility describes such a route as `default dev eno1 scope link'

The idea behind this presumably was to avoid generating IP and UDP
headers manually while the null route is sufficient to send a couple of
link-wide (maybe broadcast) messages and generic enough to work anywhere.

To this date propagator didn't bother to remove that route,
so *in some networks* it had persisted even after the initramfs
(and propagator itself) was long gone, and in other networks did not,
having been luckily replaced by the default route to DHCP gateway.

In the cases where it did the real problem showed itself
after the real userspace (for example, in a live distro)
eventually tried to reconfigure the network (because why not?).
The pesky null route was most often left untouched by the DHCP client
(ALT live distros mostly use dhcpcd), managing to squeeze its way
up the routing table and effectively preventing the host
from network access beyond a router.

If the NFS root is behind a couple routers, any attempt to access
the file system gets stuck — the system keeps tirelessly looking for
the NFS host via ARP.
2018-06-09 18:27:06 +03:00
Arseny Maslennikov
dfa3713d0f dhcp.c: Provide an option to omit the vendor class
Some obsolete DHCP implementations in specialized network hardware
(Cisco, we're looking at you) discard DHCP messages from a client
attempting to reconfigure itself and providing a different vendor class
identifier the second time — much like a network-booting system.

To cope with that, propagator will not send a vendor class identifier
if `dhcp-send-vendor-id:off' is specified as part of its "automatic"
parameters on the kernel command line.
Feel free to use any boolean value: yes/no, true/false, on/off.
The default behaviour is "yes".
2018-06-09 18:27:00 +03:00
Arseny Maslennikov
41519b564d dhcp.c: Provide a DHCP vendor class identifier in requests 2018-06-06 23:40:28 +03:00
Arseny Maslennikov
2440a17fbe Remove unnecessary whitespace from C program text 2018-05-09 15:21:26 +03:00
Leonid Krivoshein
d2866d5d21 dhcp.c: suppress warning in rfc951_sleep(). 2018-04-22 19:26:01 +03:00
Leonid Krivoshein
6afa449e2e dhcp.c: fix potentially destructive typo.
Thanks to Arseny Maslennikov <arseny@altlinux.org>.
See also: https://bugzilla.altlinux.org/show_bug.cgi?id=34322
2018-04-22 19:20:44 +03:00
Leonid Krivoshein
485839e4cc probing.c, probing.h, dhcp.c: code fixes, use black list.
+ probing.h/free_net_devices():
  - New function declared;
+ probing.c/free_net_devices():
  - Reverse for get_net_devices() to avoid memory leaks;
+ probing.c/net_dev_black_list:
  - Wireless interfaces "wlan*" added to black list;
+ dhcp.c/perform_dhcp():
  - No more restrict by interface name;
2018-04-22 15:48:10 +03:00
Anton V. Boyarshinov
bab88d61a1 dynamic interafaces names list 2013-02-14 17:08:46 +04:00
Sergey Bolshakov
3c3b7111de if case of empty automatic interface try all interfaces in turn
based on 42b2e94c by Vladislav Zavjalov <slazav@altlinux.org>
2009-03-12 17:56:31 +03:00
Sergey Bolshakov
85b34d353b dhcp next-server and root-path options can be used,
if no server nor directory params supplied in automatic mode.
2007-09-19 00:46:56 +04:00
Sergey Bolshakov
48d26b2d15 - cleaned up 2007-03-03 00:48:18 +03:00
Anton Kachalov
46438969c6 Initial revision 2004-01-20 18:32:43 +00:00