summaryrefslogtreecommitdiff
path: root/zebra/ioctl_solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/ioctl_solaris.c')
-rw-r--r--zebra/ioctl_solaris.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index b5bf1ccb0a..4bdbdaa584 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -14,10 +14,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -53,14 +52,14 @@ if_ioctl (u_long request, caddr_t buffer)
int err;
if (zserv_privs.change(ZPRIVS_RAISE))
- zlog (NULL, LOG_ERR, "Can't raise privileges");
+ zlog_err("Can't raise privileges");
sock = socket (AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
{
int save_errno = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
- zlog (NULL, LOG_ERR, "Can't lower privileges");
+ zlog_err("Can't lower privileges");
zlog_err("Cannot create UDP socket: %s", safe_strerror(save_errno));
exit (1);
}
@@ -69,7 +68,7 @@ if_ioctl (u_long request, caddr_t buffer)
err = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
- zlog (NULL, LOG_ERR, "Can't lower privileges");
+ zlog_err("Can't lower privileges");
close (sock);
@@ -85,20 +84,19 @@ if_ioctl (u_long request, caddr_t buffer)
int
if_ioctl_ipv6 (u_long request, caddr_t buffer)
{
-#ifdef HAVE_IPV6
int sock;
int ret;
int err;
if (zserv_privs.change(ZPRIVS_RAISE))
- zlog (NULL, LOG_ERR, "Can't raise privileges");
+ zlog_err("Can't raise privileges");
sock = socket (AF_INET6, SOCK_DGRAM, 0);
if (sock < 0)
{
int save_errno = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
- zlog (NULL, LOG_ERR, "Can't lower privileges");
+ zlog_err("Can't lower privileges");
zlog_err("Cannot create IPv6 datagram socket: %s",
safe_strerror(save_errno));
exit (1);
@@ -108,7 +106,7 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
err = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
- zlog (NULL, LOG_ERR, "Can't lower privileges");
+ zlog_err("Can't lower privileges");
close (sock);
@@ -117,7 +115,6 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
errno = err;
return ret;
}
-#endif /* HAVE_IPV6 */
return 0;
}
@@ -177,7 +174,6 @@ if_get_mtu (struct interface *ifp)
}
}
-#ifdef HAVE_IPV6
if (ifp->flags & IFF_IPV6)
{
memset(&lifreq, 0, sizeof(lifreq));
@@ -195,7 +191,6 @@ if_get_mtu (struct interface *ifp)
changed = 1;
}
}
-#endif /* HAVE_IPV6 */
if (changed)
zebra_interface_up_update(ifp);
@@ -403,8 +398,6 @@ if_unset_flags (struct interface *ifp, uint64_t flags)
return ret;
}
-#ifdef HAVE_IPV6
-
/* Interface's address add/delete functions. */
int
if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc)
@@ -431,5 +424,3 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
return 0;
}
-
-#endif /* HAVE_IPV6 */