FreeBSD Bugzilla – Attachment 194808 Details for
Bug 229432
11.2 network em driver - connection link flaps with dhclient and option 26 (interface mtu)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix for dhclient
dispatch.c.diff (text/plain), 905 bytes, created by
Eugene Grosbein
on 2018-07-01 06:44:19 UTC
(
hide
)
Description:
proposed fix for dhclient
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2018-07-01 06:44:19 UTC
Size:
905 bytes
patch
obsolete
>--- sbin/dhclient/dispatch.c.orig 2018-06-28 13:41:09.953111000 +0700 >+++ sbin/dhclient/dispatch.c 2018-07-01 13:29:09.401806000 +0700 >@@ -545,17 +545,29 @@ interface_set_mtu_priv(char *ifname, u_i > { > struct ifreq ifr; > int sock; >+ u_int16_t old_mtu; > > if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) > error("Can't create socket"); > > memset(&ifr, 0, sizeof(ifr)); >+ old_mtu = 0; > > strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); >- ifr.ifr_mtu = mtu; > >- if (ioctl(sock, SIOCSIFMTU, &ifr) == -1) >- warning("SIOCSIFMTU failed (%d): %s", mtu, >+ if (ioctl(sock, SIOCGIFMTU, (caddr_t)&ifr) == -1) >+ warning("SIOCGIFMTU failed (%s): %s", ifname, > strerror(errno)); >+ else >+ old_mtu = ifr.ifr_mtu; >+ >+ if (mtu != old_mtu) { >+ ifr.ifr_mtu = mtu; >+ >+ if (ioctl(sock, SIOCSIFMTU, &ifr) == -1) >+ warning("SIOCSIFMTU failed (%d): %s", mtu, >+ strerror(errno)); >+ } >+ > close(sock); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229432
:
194795
| 194808