Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rings:1-MinimalX
dhcp
0021-dhcp-ip-family-symlinks.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-dhcp-ip-family-symlinks.patch of Package dhcp
Index: client/dhclient.c =================================================================== --- client/dhclient.c.orig +++ client/dhclient.c @@ -284,6 +284,18 @@ main(int argc, char **argv) { #else progname = argv[0]; #endif + +#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)); Index: relay/dhcrelay.c =================================================================== --- relay/dhcrelay.c.orig +++ relay/dhcrelay.c @@ -300,6 +300,17 @@ main(int argc, char **argv) { progname = argv[0]; #endif +#ifdef DHCPv6 + /* 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 /* 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. */ Index: server/dhcpd.c =================================================================== --- server/dhcpd.c.orig +++ server/dhcpd.c @@ -301,6 +301,17 @@ main(int argc, char **argv) { progname = argv[0]; #endif +#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