Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109564347
D46017.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
795 B
Referenced Files
None
Subscribers
None
D46017.diff
View Options
diff --git a/sbin/nos-tun/nos-tun.c b/sbin/nos-tun/nos-tun.c
--- a/sbin/nos-tun/nos-tun.c
+++ b/sbin/nos-tun/nos-tun.c
@@ -141,7 +141,7 @@
* when tunN have no addresses, so - log and ignore it.
*
*/
- if (ioctl(s, SIOCDIFADDR, &ifra) < 0) {
+ if (ioctl(s, SIOCDIFADDR, &ifrq) < 0) {
syslog(LOG_ERR,"SIOCDIFADDR - %m");
}
@@ -220,10 +220,8 @@
/*
* Delete addresses for interface
*/
- bzero(&ifra.ifra_addr, sizeof(ifra.ifra_addr));
- bzero(&ifra.ifra_broadaddr, sizeof(ifra.ifra_addr));
- bzero(&ifra.ifra_mask, sizeof(ifra.ifra_addr));
- if (ioctl(s, SIOCDIFADDR, &ifra) < 0) {
+ bzero(&ifrq.ifr_addr, sizeof(ifrq.ifr_addr));
+ if (ioctl(s, SIOCDIFADDR, &ifrq) < 0) {
syslog(LOG_ERR,"can't delete interface's addresses - %m");
}
closing_fds:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 7, 6:44 PM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16515223
Default Alt Text
D46017.diff (795 B)
Attached To
Mode
D46017: sbin/nos-tun: correct SIOCDIFADDR calls to use ifreq
Attached
Detach File
Event Timeline
Log In to Comment