version 1.97.8.1, 2007/11/06 23:33:51 |
version 1.100.6.3, 2008/02/18 21:07:08 |
Line 358 rip_output(struct mbuf *m, ...) |
|
Line 358 rip_output(struct mbuf *m, ...) |
|
} |
} |
HTONS(ip->ip_len); |
HTONS(ip->ip_len); |
HTONS(ip->ip_off); |
HTONS(ip->ip_off); |
if (ip->ip_id == 0) |
if (ip->ip_id != 0 || m->m_pkthdr.len < IP_MINFRAGSIZE) |
ip->ip_id = ip_newid(); |
flags |= IP_NOIPNEWID; |
opts = NULL; |
opts = NULL; |
/* XXX prevent ip_output from overwriting header fields */ |
/* XXX prevent ip_output from overwriting header fields */ |
flags |= IP_RAWOUTPUT; |
flags |= IP_RAWOUTPUT; |
Line 384 rip_ctloutput(int op, struct socket *so, |
|
Line 384 rip_ctloutput(int op, struct socket *so, |
|
*m = m_intopt(so, |
*m = m_intopt(so, |
(inp->inp_flags & INP_NOHEADER) ? 1 : 0); |
(inp->inp_flags & INP_NOHEADER) ? 1 : 0); |
return 0; |
return 0; |
} else if (*m == NULL || (*m)->m_len < sizeof(int)) |
} else if (*m == NULL || (*m)->m_len != sizeof(int)) |
error = EINVAL; |
error = EINVAL; |
else if (*mtod(*m, int *)) { |
else if (*mtod(*m, int *)) { |
inp->inp_flags &= ~INP_HDRINCL; |
inp->inp_flags &= ~INP_HDRINCL; |
Line 400 rip_ctloutput(int op, struct socket *so, |
|
Line 400 rip_ctloutput(int op, struct socket *so, |
|
case PRCO_SETOPT: |
case PRCO_SETOPT: |
switch (optname) { |
switch (optname) { |
case IP_HDRINCL: |
case IP_HDRINCL: |
if (*m == NULL || (*m)->m_len < sizeof(int)) |
if (*m == NULL || (*m)->m_len != sizeof(int)) |
error = EINVAL; |
error = EINVAL; |
else if (*mtod(*m, int *)) |
else if (*mtod(*m, int *)) |
inp->inp_flags |= INP_HDRINCL; |
inp->inp_flags |= INP_HDRINCL; |