Commit Graph
23 Commits
Author SHA1 Message Date
Ben Pfaff 2c5272bc28 Set DHCP maximum retransmission timeout to 3 seconds in secchan.
This should help discovery complete faster, especially with hops across
multiple OpenFlow switches to the controller.
2008-10-14 16:14:13 -07:00
Ben Pfaff a1aa580282 dhcp-client: Log DHCP messages at higher priority.
Logging DHCP messages sent or received with priority DBG made it hard
to see what was happening.  So log them at priority WARN, but also make
them less verbose at that level since seeing the whole message is not
too useful most of the time.
2008-10-14 16:14:13 -07:00
Ben Pfaff 4040288732 dhcp-client: Fix computation of timeouts.
The "min_timeout" variable maintained by the DHCP client is measured
in seconds from the time the state was entered, but dhclient_wait()
was interpreting it as seconds from now.  This made the DHCP client wait
much longer than necessary in some cases.
2008-10-14 16:14:13 -07:00
Ben Pfaff b253101bd6 New function dhclient_get_netdev(). 2008-10-09 15:53:05 -07:00
Ben Pfaff 80a28d9455 Implement dhclient_destroy().
This function has always been prototyped in dhcp-client.h, but it had
no users and never got implemented.
2008-10-09 15:53:05 -07:00
Ben Pfaff c5e61793e9 Drop unneeded inclusions of ofp-print.h. 2008-09-04 13:53:27 -07:00
Ben Pfaff eda1328578 Avoid pointer arithmetic on void*.
This is a GCC extension not supported by other compilers.
2008-09-04 13:53:26 -07:00
Ben Pfaff 5549180a54 Rename struct buffer to struct ofpbuf.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Ben Pfaff ab43666b20 vlog: Apply rate-limiting everywhere it seems warranted. 2008-08-26 13:25:21 -07:00
Ben Pfaff 394270a0e5 New header for saturating arithmetic. 2008-08-26 12:04:41 -07:00
Ben Pfaff 3e464f2c68 Add functions for reporting dhcp client statistics. 2008-08-26 11:51:17 -07:00
Ben Pfaff 72984bb5e9 Make discovery happen faster.
This reduces the initial delay before sending DHCPDISCOVER from
1...10 seconds to 1...3 seconds.
2008-08-12 16:10:01 -07:00
Ben Pfaff b3b28afb7b Use signal-based timekeeping functions throughout the source base. 2008-08-12 15:21:30 -07:00
Ben Pfaff 7b30178058 dhcp: Make client signal a change if renewing yields different options.
This allows the secchan to connect to a new controller if the DHCP server
starts announcing a new vconn without invalidating old leases.
2008-07-30 15:46:38 -07:00
Ben Pfaff 5fed6531b9 Enable secchan, ofp-discover to update /etc/resolv.conf.
This way it becomes possible to more reliably refer to the controller
and the PKI server using hostnames.
2008-07-23 14:30:59 -07:00
Ben Pfaff fcecfa88a9 dhcp: Only print "entering" message if state actually changes. 2008-07-23 13:12:17 -07:00
Ben Pfaff 6fd1cf6b87 dhcp: Don't attempt to drain netdev if we ran out of packets.
Fixes a theoretical race condition that would have caused more
retransmission than otherwise necessary.
2008-07-23 13:12:17 -07:00
Ben Pfaff 9c6191bf82 dhcp: Make dhcp_msg_to_string() support a multiline format also.
The upcoming ofp-discover program wants to print out the binding
information, and dhcp_msg_to_string() is pretty close to what it
wants.  But one-field-per-line is easier for other programs to parse.
2008-07-22 14:01:10 -07:00
Ben Pfaff 489d9ca0be dhcp: Break out netdev configuration from DHCP binding.
This allows us to have DHCP clients that don't actually bind or unbind
a network device's IP address.  This is useful for doing controller
discovery without actually reconfiguring a network device.
2008-07-22 14:01:01 -07:00
Ben Pfaff b761e41bb2 dhcp: Be more precise about updating 'changed' flag.
There's no need to set changed unconditionally in dhclient_init(), and
it can make extra work for the users of the dhclient, by causing them
to think that something changed when it didn't.
2008-07-22 14:00:03 -07:00
Ben Pfaff f730dded18 Move Autoconf's macro definitions into config.h.
This makes "make" output slightly more readable.
2008-07-21 15:05:53 -07:00
Ben Pfaff 295b175a84 Use an IP ID of 0 for transmitted DHCP packets.
We can't guarantee uniqueness of ip_id versus the host's, screwing up
fragment reassembly, so prevent fragmentation and use an all-zeros
ip_id.  RFC 791 doesn't say we can do this, but Linux does the same
thing for DF packets, so it must not screw anything up.
2008-07-18 14:16:40 -07:00
Ben Pfaff 6d841e9f81 Implement DHCP client. 2008-07-18 14:16:40 -07:00