]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/sockunion.c
*: auto-convert to SPDX License IDs
[mirror_frr.git] / lib / sockunion.c
index eff38798cc786bde9e578b2dd41e197a5af3053b..c37ab1d6dd5316f6a73ffa802c238062e4e4ddbf 100644 (file)
@@ -1,21 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Socket union related function.
  * Copyright (c) 1997, 98 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * 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 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>
@@ -290,8 +275,10 @@ int sockopt_reuseaddr(int sock)
        ret = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
                         sizeof(on));
        if (ret < 0) {
-               flog_err(EC_LIB_SOCKET,
-                        "can't set sockopt SO_REUSEADDR to socket %d", sock);
+               flog_err(
+                       EC_LIB_SOCKET,
+                       "can't set sockopt SO_REUSEADDR to socket %d errno=%d: %s",
+                       sock, errno, safe_strerror(errno));
                return -1;
        }
        return 0;