ndk-busybox/networking/udhcp
Denys Vlasenko ed898ed2dd udhcp6: fix releasing
Patch is based on work by tiggerswelt.net. They say:
"
We wanted udhcpc6 to release its IPv6-Addresses on
quit (-R-commandline-option) which turned out to generate once again
kind of garbage on the network-link.
We tracked this down to two issues:

 - udhcpc6 uses a variable called "srv6_buf" to send packets to
   the dhcp6-server, but this variable is never initialized correctly
   and contained kind of a garbage-address

 - The address of the dhcp6-server is usually a link-local-address,
   that requires an interface-index when using connect() on an AF_INET6-
   socket

We added an
additional parameter for ifindex to d6_send_kernel_packet() and made
d6_recv_raw_packet() to capture the address of the dhcp6-server and
forward it to its callee.
"

Three last patches together:

function                                             old     new   delta
d6_read_interface                                      -     454    +454
d6_recv_raw_packet                                     -     283    +283
option_to_env                                        249     504    +255
.rodata                                           165226  165371    +145
send_d6_discover                                     195     237     +42
send_d6_select                                       118     159     +41
send_d6_renew                                        173     186     +13
send_d6_release                                      162     173     +11
opt_req                                                -      10     +10
d6_send_kernel_packet                                304     312      +8
opt_fqdn_req                                           -       6      +6
d6_mcast_from_client_config_ifindex                   48      51      +3
d6_find_option                                        63      61      -2
udhcpc6_main                                        2416    2411      -5
static.d6_recv_raw_packet                            266       -    -266
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/2 up/down: 1271/-273)         Total: 998 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-03-27 22:44:22 +02:00
..
arpping.c dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
common.c typo in comment 2017-01-29 18:48:58 +01:00
common.h udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
Config.src Big cleanup in config help and description 2017-01-10 14:58:54 +01:00
d6_common.h udhcp6: fix releasing 2017-03-27 22:44:22 +02:00
d6_dhcpc.c udhcp6: fix releasing 2017-03-27 22:44:22 +02:00
d6_packet.c udhcp6: fix releasing 2017-03-27 22:44:22 +02:00
d6_socket.c udhcp6: read_interface should save link-local ipv6 address 2017-03-27 22:41:59 +02:00
dhcpc.c udhcpc: make sure we do not overflow poll timeout 2017-02-17 19:20:32 +01:00
dhcpc.h udhcpc6: fix port numbers used if !FEATURE_UDHCP_PORT 2013-01-28 15:25:35 +01:00
dhcpd.c udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
dhcpd.h dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
dhcprelay.c Convert all udhcp applets to "new style" applet definitions 2016-11-23 18:54:59 +01:00
domain_codec.c udhcpc: fix a warning in debug code 2016-03-11 00:26:58 +01:00
dumpleases.c make --help texts more uniform 2017-01-21 02:49:58 +01:00
Kbuild.src fix breakage found by mass one-applet builds 2016-12-23 02:42:26 +01:00
packet.c udhcp: get rid of bb_info_msg() 2016-03-30 18:41:23 +02:00
signalpipe.c udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
socket.c udhcp: get rid of bb_info_msg() 2016-03-30 18:41:23 +02:00