Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
dhcp
0029-dhcp-ip-family-symlinks.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0029-dhcp-ip-family-symlinks.patch of Package dhcp
--- client/dhclient.c.orig +++ client/dhclient.c @@ -164,6 +164,17 @@ main(int argc, char **argv) { #endif /* DHCPv6 */ char *s; +#ifdef DHCPv6 + /* Support being called using `dhclient4` or `dhclient6` symlinks */ + if (argv[0][strlen(argv[0]) - 1] == '4') { + local_family_set = 1; + local_family = AF_INET; + } else if (argv[0][strlen(argv[0]) - 1] == '6') { + local_family_set = 1; + local_family = AF_INET6; + } +#endif /* DHCPv6 */ + /* Initialize client globals. */ memset(&default_duid, 0, sizeof(default_duid)); --- relay/dhcrelay.c.orig +++ relay/dhcrelay.c @@ -182,6 +182,15 @@ main(int argc, char **argv) { #ifdef DHCPv6 struct stream_list *sl = NULL; int local_family_set = 0; + + /* Support being called using `dhcrelay4` or `dhcrelay6` symlinks */ + if (argv[0][strlen(argv[0]) - 1] == '4') { + local_family_set = 1; + local_family = AF_INET; + } else if (argv[0][strlen(argv[0]) - 1] == '6') { + local_family_set = 1; + local_family = AF_INET6; + } #endif /* Make sure that file descriptors 0(stdin), 1,(stdout), and --- server/dhcpd.c.orig +++ server/dhcpd.c @@ -195,6 +195,17 @@ main(int argc, char **argv) { char *set_chroot = 0; #endif /* PARANOIA */ +#ifdef DHCPv6 + /* Support being called using `dhcpd4` or `dhcpd6` symlinks */ + if (argv[0][strlen(argv[0]) - 1] == '4') { + local_family_set = 1; + local_family = AF_INET; + } else if (argv[0][strlen(argv[0]) - 1] == '6') { + local_family_set = 1; + local_family = AF_INET6; + } +#endif /* DHCPv6 */ + /* Make sure that file descriptors 0 (stdin), 1, (stdout), and 2 (stderr) are open. To do this, we assume that when we open a file the lowest available file descriptor is used. */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor