unbreaks NAT lookups with UDP; tested as a transparent DNS relay.
-/* $OpenBSD: pfe_filter.c,v 1.30 2008/06/11 18:21:19 reyk Exp $ */
+/* $OpenBSD: pfe_filter.c,v 1.31 2008/07/09 14:57:01 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
bcopy(&out6->sin6_addr, &pnl.daddr.addr8, out6->sin6_len);
pnl.dport = out6->sin6_port;
}
- pnl.proto = IPPROTO_TCP;
+ pnl.proto = cnl->proto;
pnl.direction = PF_IN;
cnl->in = 1;
-/* $OpenBSD: relay.c,v 1.90 2008/06/11 18:21:19 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.91 2008/07/09 14:57:01 reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
cnl->in = -1;
cnl->id = con->se_id;
cnl->proc = proc_id;
+ cnl->proto = IPPROTO_TCP;
bcopy(&con->se_in.ss, &cnl->src, sizeof(cnl->src));
bcopy(&rlay->rl_conf.ss, &cnl->dst, sizeof(cnl->dst));
imsg_compose(ibuf_pfe, IMSG_NATLOOK, 0, 0, -1, cnl,
-/* $OpenBSD: relay_udp.c,v 1.12 2008/07/09 10:50:34 reyk Exp $ */
+/* $OpenBSD: relay_udp.c,v 1.13 2008/07/09 14:57:01 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
cnl->in = -1;
cnl->id = con->se_id;
cnl->proc = proc_id;
+ cnl->proto = IPPROTO_UDP;
bcopy(&con->se_in.ss, &cnl->src, sizeof(cnl->src));
bcopy(&rlay->rl_conf.ss, &cnl->dst, sizeof(cnl->dst));
imsg_compose(ibuf_pfe, IMSG_NATLOOK, 0, 0, -1, cnl,
-/* $OpenBSD: relayd.h,v 1.104 2008/07/09 10:50:34 reyk Exp $ */
+/* $OpenBSD: relayd.h,v 1.105 2008/07/09 14:57:01 reyk Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
in_port_t rsport;
in_port_t rdport;
int in;
+ int proto;
};
struct ctl_bindany {