X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fsolaris%2Fdevice.c;h=73046b8c8f9e76c17afcc9fefe6d73c98e4691cb;hb=985d19caf20058db3c764f0f6fbeafa8bcc59fcc;hp=deb96c4597bdb9c10daaebb8a89bdcc7face75a9;hpb=6b5cfe97f4d3f93bde5c3eac5cb82b20b160ae36;p=tinc diff --git a/src/solaris/device.c b/src/solaris/device.c index deb96c45..73046b8c 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -2,7 +2,7 @@ device.c -- Interaction with Solaris tun device Copyright (C) 2001-2005 Ivo Timmermans, 2002-2010 OpenVPN Technologies, Inc. - 2001-2014 Guus Sliepen + 2001-2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -115,7 +115,7 @@ static bool setup_device(void) { struct strioctl strioc_ppa = { .ic_cmd = TUNNEWPPA, - .ic_len = sizeof ppa, + .ic_len = sizeof(ppa), .ic_dp = (char *)&ppa, }; @@ -156,7 +156,7 @@ static bool setup_device(void) { { /* Remove muxes just in case they are left over from a crashed tincd */ struct lifreq ifr = {}; - strncpy(ifr.lifr_name, iface, sizeof ifr.lifr_name); + strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name)); if(ioctl(ip_fd, SIOCGLIFMUXID, &ifr) >= 0) { int muxid = ifr.lifr_arp_muxid; ioctl(ip_fd, I_PUNLINK, muxid); @@ -229,7 +229,7 @@ static bool setup_device(void) { /* Set ifname to arp */ struct strioctl strioc_if = { .ic_cmd = SIOCSLIFNAME, - .ic_len = sizeof ifr, + .ic_len = sizeof(ifr), .ic_dp = (char *)&ifr, }; @@ -285,7 +285,7 @@ static bool setup_device(void) { static void close_device(void) { if(iface) { struct lifreq ifr = {}; - strncpy(ifr.lifr_name, iface, sizeof ifr.lifr_name); + strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name)); if(ioctl(ip_fd, SIOCGLIFMUXID, &ifr) >= 0) { int muxid = ifr.lifr_arp_muxid; ioctl(ip_fd, I_PUNLINK, muxid);