-/* $OpenBSD: if_gif.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: if_gif.c,v 1.66 2014/04/21 12:22:25 henning Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
switch (sc->gif_psrc->sa_family) {
#ifdef INET
case AF_INET:
- ip_output(m, NULL, NULL, 0, NULL, NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL, 0);
break;
#endif
#ifdef INET6
-/* $OpenBSD: if_gre.c,v 1.66 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: if_gre.c,v 1.67 2014/04/21 12:22:25 henning Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
#endif
/* Send it off */
- error = ip_output(m, NULL, &sc->route, 0, NULL, NULL);
+ error = ip_output(m, NULL, &sc->route, 0, NULL, NULL, 0);
end:
if (error)
ifp->if_oerrors++;
-/* $OpenBSD: if_pflow.c,v 1.42 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.43 2014/04/21 12:22:25 henning Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
sc->sc_if.if_opackets++;
sc->sc_if.if_obytes += m->m_pkthdr.len;
- if ((err = ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL))) {
+ if ((err = ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL,
+ 0))) {
pflowstats.pflow_oerrors++;
sc->sc_if.if_oerrors++;
}
-/* $OpenBSD: if_pfsync.c,v 1.205 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.206 2014/04/21 12:22:25 henning Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
- if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL) == 0)
+ if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL, 0) == 0)
pfsyncstats.pfsyncs_opackets++;
else
pfsyncstats.pfsyncs_oerrors++;
switch (pd->pd_st->key[PF_SK_WIRE]->af) {
#ifdef INET
case AF_INET:
- ip_output(pd->pd_m, NULL, NULL, 0,
- NULL, NULL);
+ ip_output(pd->pd_m, NULL, NULL, 0, NULL, NULL,
+ 0);
break;
#endif /* INET */
#ifdef INET6
-/* $OpenBSD: if_vxlan.c,v 1.12 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.13 2014/04/21 12:22:25 henning Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
#ifdef INET
if ((error =
- ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL))) {
+ ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL, 0))) {
ifp->if_oerrors++;
}
#endif
-/* $OpenBSD: pf.c,v 1.874 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.875 2014/04/21 12:22:25 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
#ifdef INET
case AF_INET:
if (eh == NULL) {
- ip_output(m, NULL, NULL, 0, NULL, NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL, 0);
} else {
struct route ro;
struct rtentry rt;
memcpy(e->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN);
memcpy(e->ether_dhost, eh->ether_shost, ETHER_ADDR_LEN);
e->ether_type = eh->ether_type;
- ip_output(m, NULL, &ro, IP_ROUTETOETHER, NULL, NULL);
+ ip_output(m, NULL, &ro, IP_ROUTETOETHER, NULL, NULL, 0);
}
break;
#endif /* INET */
-/* $OpenBSD: pipex.c,v 1.49 2014/04/18 22:23:50 claudio Exp $ */
+/* $OpenBSD: pipex.c,v 1.50 2014/04/21 12:22:25 henning Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
gre->flags = htons(gre->flags);
m0->m_pkthdr.rcvif = session->pipex_iface->ifnet_this;
- if (ip_output(m0, NULL, NULL, 0, NULL, NULL) != 0) {
+ if (ip_output(m0, NULL, NULL, 0, NULL, NULL, 0) != 0) {
PIPEX_DBG((session, LOG_DEBUG, "ip_output failed."));
goto drop;
}
ip->ip_ttl = MAXTTL;
ip->ip_tos = 0;
- if (ip_output(m0, NULL, NULL, IP_IPSECFLOW, NULL, NULL,
+ if (ip_output(m0, NULL, NULL, 0, NULL, NULL,
session->proto.l2tp.ipsecflowinfo) != 0) {
PIPEX_DBG((session, LOG_DEBUG, "ip_output failed."));
goto drop;
-/* $OpenBSD: igmp.c,v 1.38 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: igmp.c,v 1.39 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
imo.imo_multicast_loop = 0;
#endif /* MROUTING */
- ip_output(m, NULL, NULL, IP_MULTICASTOPTS, &imo, NULL);
+ ip_output(m, NULL, NULL, IP_MULTICASTOPTS, &imo, NULL, 0);
++igmpstat.igps_snd_reports;
}
-/* $OpenBSD: ip_carp.c,v 1.227 2014/04/20 14:54:39 henning Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.228 2014/04/21 12:22:26 henning Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
carpstats.carps_opackets++;
error = ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo,
- NULL);
+ NULL, 0);
if (error) {
if (error == ENOBUFS)
carpstats.carps_onomem++;
-/* $OpenBSD: ip_divert.c,v 1.20 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_divert.c,v 1.21 2014/04/21 12:22:26 henning Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
splx(s);
} else {
error = ip_output(m, NULL, &inp->inp_route,
- IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL);
+ IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL, 0);
if (error == EACCES) /* translate pf(4) error for userland */
error = EHOSTUNREACH;
}
-/* $OpenBSD: ip_icmp.c,v 1.120 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.121 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
printf("icmp_send dst %s src %s\n", dst, src);
}
#endif
- ip_output(m, opts, NULL, 0, NULL, NULL);
+ ip_output(m, opts, NULL, 0, NULL, NULL, 0);
}
n_time
-/* $OpenBSD: ip_input.c,v 1.230 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: ip_input.c,v 1.231 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
error = ip_output(m, NULL, &ipforward_rt,
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
- NULL, NULL);
+ NULL, NULL, 0);
if (error)
ipstat.ips_cantforward++;
else {
-/* $OpenBSD: ip_mroute.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.66 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
if (vifp->v_flags & VIFF_TUNNEL) {
/* If tunnel options */
- ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, NULL, NULL);
+ ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, NULL, NULL,
+ 0);
} else {
/*
* if physical interface option, extract the options
imo.imo_multicast_loop = 1;
error = ip_output(m, NULL, NULL,
- IP_FORWARDING | IP_MULTICASTOPTS, &imo, NULL);
+ IP_FORWARDING | IP_MULTICASTOPTS, &imo, NULL, 0);
if (mrtdebug & DEBUG_XMIT)
log(LOG_DEBUG, "phyint_send on vif %ld err %d\n",
-/* $OpenBSD: ip_output.c,v 1.262 2014/04/20 09:38:19 henning Exp $ */
+/* $OpenBSD: ip_output.c,v 1.263 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
*/
int
ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
- struct ip_moptions *imo, struct inpcb *inp, ...)
+ struct ip_moptions *imo, struct inpcb *inp, u_int32_t ipsecflowinfo)
{
struct ip *ip;
struct ifnet *ifp;
struct tdb_ident *tdbi;
struct tdb *tdb;
- u_int32_t ipsecflowinfo = 0;
#if NPF > 0
struct ifnet *encif;
#endif
#ifdef IPSEC
if (inp && (inp->inp_flags & INP_IPV6) != 0)
panic("ip_output: IPv6 pcb is passed");
- if (flags & IP_IPSECFLOW) {
- va_list ap;
- va_start(ap, inp);
- ipsecflowinfo = va_arg(ap, u_int32_t);
- va_end(ap);
- }
#endif /* IPSEC */
#ifdef DIAGNOSTIC
-/* $OpenBSD: ip_var.h,v 1.55 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: ip_var.h,v 1.56 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
struct in_addr ipq_src, ipq_dst;
};
-/* flags passed to ip_output as last parameter */
+/* flags passed to ip_output */
#define IP_FORWARDING 0x1 /* most of ip header exists */
#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
#define IP_MTUDISC 0x0800 /* pmtu discovery, set DF */
#define IP_ROUTETOETHER 0x1000 /* ether addresses given */
-#define IP_IPSECFLOW 0x2000 /* IPsec flow info */
extern struct ipstat ipstat;
extern LIST_HEAD(ipqhead, ipq) ipq; /* ip reass. queue */
int ip_mforward(struct mbuf *, struct ifnet *);
int ip_optcopy(struct ip *, struct ip *);
int ip_output(struct mbuf *, struct mbuf *, struct route *, int,
- struct ip_moptions *, struct inpcb *, ...);
+ struct ip_moptions *, struct inpcb *, u_int32_t);
int ip_pcbopts(struct mbuf **, struct mbuf *);
struct mbuf *
ip_reass(struct ipqent *, struct ipq *);
-/* $OpenBSD: ipsec_output.c,v 1.51 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.52 2014/04/21 12:22:26 henning Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
switch (tdb->tdb_dst.sa.sa_family) {
#ifdef INET
case AF_INET:
- return (ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL));
+ return (ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL, 0));
#endif /* INET */
#ifdef INET6
-/* $OpenBSD: raw_ip.c,v 1.71 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.72 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
error = ip_output(m, inp->inp_options, &inp->inp_route, flags,
- inp->inp_moptions, inp);
+ inp->inp_moptions, inp, 0);
if (error == EACCES) /* translate pf(4) error for userland */
error = EHOSTUNREACH;
return (error);
-/* $OpenBSD: tcp_input.c,v 1.274 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.275 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
#ifdef INET
case AF_INET:
error = ip_output(m, sc->sc_ipopts, ro,
- (ip_mtudisc ? IP_MTUDISC : 0), NULL, inp);
+ (ip_mtudisc ? IP_MTUDISC : 0), NULL, inp, 0);
break;
#endif
#ifdef INET6
-/* $OpenBSD: tcp_output.c,v 1.105 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.106 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
}
error = ip_output(m, tp->t_inpcb->inp_options,
&tp->t_inpcb->inp_route,
- (ip_mtudisc ? IP_MTUDISC : 0), NULL, tp->t_inpcb);
+ (ip_mtudisc ? IP_MTUDISC : 0), NULL, tp->t_inpcb, 0);
break;
#endif /* INET */
#ifdef INET6
-/* $OpenBSD: tcp_subr.c,v 1.128 2014/04/21 11:10:54 henning Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.129 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
ip->ip_ttl = ip_defttl;
ip->ip_tos = 0;
ip_output(m, NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
- NULL, tp ? tp->t_inpcb : NULL);
+ NULL, tp ? tp->t_inpcb : NULL, 0);
}
}
-/* $OpenBSD: udp_usrreq.c,v 1.182 2014/04/18 10:48:29 jca Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.183 2014/04/21 12:22:26 henning Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
error = ip_output(m, inp->inp_options, &inp->inp_route,
- (inp->inp_socket->so_options & SO_BROADCAST) | IP_IPSECFLOW,
- inp->inp_moptions, inp, ipsecflowinfo);
+ (inp->inp_socket->so_options & SO_BROADCAST), inp->inp_moptions,
+ inp, ipsecflowinfo);
if (error == EACCES) /* translate pf(4) error for userland */
error = EHOSTUNREACH;