}
/* Return sizeof union sockunion. */
-static int sockunion_sizeof(const union sockunion *su)
+int sockunion_sizeof(const union sockunion *su)
{
int ret;
* Which on linux is a no-op since it is enabled by
* default and on BSD it uses TCP_NOPUSH to do
* the same thing( which it was not configured to
- * use). This cleanup of the api occured on 8/1/17
+ * use). This cleanup of the api occurred on 8/1/17
* I imagine if after more than 1 year of no-one
* complaining, and a major upgrade release we
* can deprecate and remove this function call
return 0;
}
-int sockopt_mark_default(int sock, int mark, struct zebra_privs_t *cap)
-{
-#ifdef SO_MARK
- int ret;
-
- frr_elevate_privs(cap) {
- ret = setsockopt(sock, SOL_SOCKET, SO_MARK, &mark,
- sizeof(mark));
- }
- return ret;
-#else
- return 0;
-#endif
-}
-
int sockopt_minttl(int family, int sock, int minttl)
{
#ifdef IP_MINTTL
return jhash_1word(su->sin.sin_addr.s_addr, 0);
case AF_INET6:
return jhash2(su->sin6.sin6_addr.s6_addr32,
- ZEBRA_NUM_OF(su->sin6.sin6_addr.s6_addr32), 0);
+ array_size(su->sin6.sin6_addr.s6_addr32), 0);
}
return 0;
}
len = sizeof name;
ret = getpeername(fd, (struct sockaddr *)&name, &len);
if (ret < 0) {
- flog_err(EC_LIB_SOCKET,
- "Can't get remote address and port: %s",
+ flog_err(EC_LIB_SOCKET, "Can't get remote address and port: %s",
safe_strerror(errno));
return NULL;
}