Deleted Added
full compact
udp6_usrreq.c (91346) udp6_usrreq.c (91354)
1/* $FreeBSD: head/sys/netinet6/udp6_usrreq.c 91346 2002-02-27 02:44:45Z alfred $ */
1/* $FreeBSD: head/sys/netinet6/udp6_usrreq.c 91354 2002-02-27 04:45:37Z dd $ */
2/* $KAME: udp6_usrreq.c,v 1.27 2001/05/21 05:45:10 jinmei Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 471 unchanged lines hidden (view full) ---

481 inp = in6_pcblookup_hash(&udbinfo, &addrs[1].sin6_addr,
482 addrs[1].sin6_port,
483 &addrs[0].sin6_addr, addrs[0].sin6_port,
484 1, NULL);
485 if (!inp || !inp->inp_socket) {
486 error = ENOENT;
487 goto out;
488 }
2/* $KAME: udp6_usrreq.c,v 1.27 2001/05/21 05:45:10 jinmei Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 471 unchanged lines hidden (view full) ---

481 inp = in6_pcblookup_hash(&udbinfo, &addrs[1].sin6_addr,
482 addrs[1].sin6_port,
483 &addrs[0].sin6_addr, addrs[0].sin6_port,
484 1, NULL);
485 if (!inp || !inp->inp_socket) {
486 error = ENOENT;
487 goto out;
488 }
489 bzero(&xuc, sizeof(xuc));
490 xuc.cr_uid = inp->inp_socket->so_cred->cr_uid;
491 xuc.cr_ngroups = inp->inp_socket->so_cred->cr_ngroups;
492 bcopy(inp->inp_socket->so_cred->cr_groups, xuc.cr_groups,
493 sizeof(xuc.cr_groups));
489 cru2x(inp->inp_socket->so_cred, &xuc);
494 error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
495out:
496 splx(s);
497 return (error);
498}
499
500SYSCTL_PROC(_net_inet6_udp6, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW,
501 0, 0,

--- 242 unchanged lines hidden ---
490 error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
491out:
492 splx(s);
493 return (error);
494}
495
496SYSCTL_PROC(_net_inet6_udp6, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW,
497 0, 0,

--- 242 unchanged lines hidden ---