summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/ip/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/inet/ip/icmp.c')
-rw-r--r--usr/src/uts/common/inet/ip/icmp.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/usr/src/uts/common/inet/ip/icmp.c b/usr/src/uts/common/inet/ip/icmp.c
index ff3f143995..3589779f20 100644
--- a/usr/src/uts/common/inet/ip/icmp.c
+++ b/usr/src/uts/common/inet/ip/icmp.c
@@ -116,7 +116,7 @@ static void icmp_icmp_error_ipv6(conn_t *connp, mblk_t *mp,
ip_recv_attr_t *);
static void icmp_info_req(queue_t *q, mblk_t *mp);
static void icmp_input(void *, mblk_t *, void *, ip_recv_attr_t *);
-static conn_t *icmp_open(int family, cred_t *credp, int *err, int flags);
+static conn_t *icmp_open(int family, cred_t *credp, int *err, int flags);
static int icmp_openv4(queue_t *q, dev_t *devp, int flag, int sflag,
cred_t *credp);
static int icmp_openv6(queue_t *q, dev_t *devp, int flag, int sflag,
@@ -138,8 +138,8 @@ static int icmp_snmp_set(queue_t *q, t_scalar_t level, t_scalar_t name,
uchar_t *ptr, int len);
static void icmp_ud_err(queue_t *q, mblk_t *mp, t_scalar_t err);
static void icmp_tpi_unbind(queue_t *q, mblk_t *mp);
-static void icmp_wput(queue_t *q, mblk_t *mp);
-static void icmp_wput_fallback(queue_t *q, mblk_t *mp);
+static int icmp_wput(queue_t *q, mblk_t *mp);
+static int icmp_wput_fallback(queue_t *q, mblk_t *mp);
static void icmp_wput_other(queue_t *q, mblk_t *mp);
static void icmp_wput_iocdata(queue_t *q, mblk_t *mp);
static void icmp_wput_restricted(queue_t *q, mblk_t *mp);
@@ -183,12 +183,12 @@ static struct qinit icmprinitv6 = {
};
static struct qinit icmpwinit = {
- (pfi_t)icmp_wput, (pfi_t)ip_wsrv, NULL, NULL, NULL, &icmp_mod_info
+ icmp_wput, ip_wsrv, NULL, NULL, NULL, &icmp_mod_info
};
/* ICMP entry point during fallback */
static struct qinit icmp_fallback_sock_winit = {
- (pfi_t)icmp_wput_fallback, NULL, NULL, NULL, NULL, &icmp_mod_info
+ icmp_wput_fallback, NULL, NULL, NULL, NULL, &icmp_mod_info
};
/* For AF_INET aka /dev/icmp */
@@ -722,7 +722,7 @@ rawip_do_connect(conn_t *connp, const struct sockaddr *sa, socklen_t len,
sin_t *sin;
sin6_t *sin6;
int error;
- uint16_t dstport;
+ uint16_t dstport;
ipaddr_t v4dst;
in6_addr_t v6dst;
uint32_t flowinfo;
@@ -1967,7 +1967,7 @@ int
icmp_tpi_opt_get(queue_t *q, int level, int name, uchar_t *ptr)
{
conn_t *connp = Q_TO_CONN(q);
- int err;
+ int err;
err = icmp_opt_get(connp, level, name, ptr);
return (err);
@@ -2294,9 +2294,9 @@ icmp_opt_set(conn_t *connp, uint_t optset_context, int level, int name,
/*
* Note: Implies T_CHECK semantics for T_OPTCOM_REQ
* inlen != 0 implies value supplied and
- * we have to "pretend" to set it.
+ * we have to "pretend" to set it.
* inlen == 0 implies that there is no
- * value part in T_CHECK request and just validation
+ * value part in T_CHECK request and just validation
* done elsewhere should be enough, we just return here.
*/
if (inlen == 0) {
@@ -4235,7 +4235,7 @@ icmp_prepend_header_template(conn_t *connp, ip_xmit_attr_t *ixa, mblk_t *mp,
* consumes the message or passes it downstream; it never queues a
* a message.
*/
-void
+int
icmp_wput(queue_t *q, mblk_t *mp)
{
sin6_t *sin6;
@@ -4262,7 +4262,7 @@ icmp_wput(queue_t *q, mblk_t *mp)
/* sockfs never sends down M_DATA */
BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
freemsg(mp);
- return;
+ return (0);
case M_PROTO:
case M_PCPROTO:
@@ -4270,13 +4270,13 @@ icmp_wput(queue_t *q, mblk_t *mp)
if (MBLKL(mp) < sizeof (*tudr) ||
((t_primp_t)mp->b_rptr)->type != T_UNITDATA_REQ) {
icmp_wput_other(q, mp);
- return;
+ return (0);
}
break;
default:
icmp_wput_other(q, mp);
- return;
+ return (0);
}
/* Handle valid T_UNITDATA_REQ here */
@@ -4392,7 +4392,7 @@ icmp_wput(queue_t *q, mblk_t *mp)
}
if (error == 0) {
freeb(mp);
- return;
+ return (0);
}
break;
@@ -4418,7 +4418,7 @@ icmp_wput(queue_t *q, mblk_t *mp)
error = icmp_output_hdrincl(connp, data_mp, cr, pid);
if (error == 0) {
freeb(mp);
- return;
+ return (0);
}
/* data_mp consumed above */
data_mp = NULL;
@@ -4467,14 +4467,14 @@ icmp_wput(queue_t *q, mblk_t *mp)
}
if (error == 0) {
freeb(mp);
- return;
+ return (0);
}
break;
}
ASSERT(mp != NULL);
/* mp is freed by the following routine */
icmp_ud_err(q, mp, (t_scalar_t)error);
- return;
+ return (0);
ud_error2:
BUMP_MIB(&is->is_rawip_mib, rawipOutErrors);
@@ -4482,6 +4482,7 @@ ud_error2:
ASSERT(mp != NULL);
/* mp is freed by the following routine */
icmp_ud_err(q, mp, (t_scalar_t)error);
+ return (0);
}
/*
@@ -4818,13 +4819,14 @@ ud_error:
}
/* ARGSUSED */
-static void
+static int
icmp_wput_fallback(queue_t *q, mblk_t *mp)
{
#ifdef DEBUG
cmn_err(CE_CONT, "icmp_wput_fallback: Message during fallback \n");
#endif
freemsg(mp);
+ return (0);
}
static void
@@ -5500,7 +5502,7 @@ rawip_activate(sock_lower_handle_t proto_handle,
sock_upper_handle_t sock_handle, sock_upcalls_t *sock_upcalls, int flags,
cred_t *cr)
{
- conn_t *connp = (conn_t *)proto_handle;
+ conn_t *connp = (conn_t *)proto_handle;
struct sock_proto_props sopp;
/* All Solaris components should pass a cred for this operation. */
@@ -5689,7 +5691,7 @@ int
rawip_ioctl(sock_lower_handle_t proto_handle, int cmd, intptr_t arg,
int mode, int32_t *rvalp, cred_t *cr)
{
- conn_t *connp = (conn_t *)proto_handle;
+ conn_t *connp = (conn_t *)proto_handle;
int error;
/* All Solaris components should pass a cred for this operation. */