aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2004-05-03 17:15:34 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2004-05-03 17:15:34 +0000
commit1a0c4873ed54e6ee0c4f5363ccd02baf0f3932f2 (patch)
treefa82d5d03c7ab380a1087f85407657b8fa884949 /sys/netinet/raw_ip.c
parentce722a01bed72cbb3c67dd1b22f0886ee115ab19 (diff)
downloadsrc-1a0c4873ed54e6ee0c4f5363ccd02baf0f3932f2.tar.gz
src-1a0c4873ed54e6ee0c4f5363ccd02baf0f3932f2.zip
o Fix misindentation in the previous commit.
Notes
Notes: svn path=/head/; revision=128880
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index f4eb92c6b57c..6668059f8d00 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -208,8 +208,8 @@ rip_input(struct mbuf *m, int off)
inp->inp_faddr.s_addr != ip->ip_src.s_addr)
goto docontinue;
if (jailed(inp->inp_socket->so_cred))
- if (htonl(prison_getip(inp->inp_socket->so_cred))
- != ip->ip_dst.s_addr)
+ if (htonl(prison_getip(inp->inp_socket->so_cred)) !=
+ ip->ip_dst.s_addr)
goto docontinue;
if (last) {
struct mbuf *n;
@@ -268,7 +268,7 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
ip->ip_len = m->m_pkthdr.len;
if (jailed(inp->inp_socket->so_cred))
ip->ip_src.s_addr =
- htonl(prison_getip(inp->inp_socket->so_cred));
+ htonl(prison_getip(inp->inp_socket->so_cred));
else
ip->ip_src = inp->inp_laddr;
ip->ip_dst.s_addr = dst;
@@ -281,7 +281,7 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
ip = mtod(m, struct ip *);
if (jailed(inp->inp_socket->so_cred)) {
if (ip->ip_src.s_addr !=
- htonl(prison_getip(inp->inp_socket->so_cred))) {
+ htonl(prison_getip(inp->inp_socket->so_cred))) {
m_freem(m);
return (EPERM);
}
@@ -639,11 +639,10 @@ rip_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
return EINVAL;
if (jailed(td->td_ucred)) {
- if (addr->sin_addr.s_addr == INADDR_ANY)
+ if (addr->sin_addr.s_addr == INADDR_ANY)
addr->sin_addr.s_addr =
- htonl(prison_getip(td->td_ucred));
- if (htonl(prison_getip(td->td_ucred))
- != addr->sin_addr.s_addr)
+ htonl(prison_getip(td->td_ucred));
+ if (htonl(prison_getip(td->td_ucred)) != addr->sin_addr.s_addr)
return (EADDRNOTAVAIL);
}