Merge branch 'master' of github.com:opnsense/src

This commit is contained in:
Ad Schellevis 2015-04-24 01:18:40 +02:00
commit 71871c4b5c
2 changed files with 10 additions and 6 deletions

View file

@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -241,11 +240,15 @@ eval_pfaltq(struct pfctl *pf, struct pf_altq *pa, struct node_queue_bw *bw,
pa->ifbandwidth = bw->bw_absolute;
else
#ifdef __FreeBSD__
rate = getifspeed(pf->dev, pa->ifname);
if (rate == 0)
rate = IF_Mbps(100);
if ((rate = getifspeed(pf->dev, pa->ifname)) == 0) {
#else
if ((rate = getifspeed(pa->ifname)) == 0) {
#endif
if ((pa->ifbandwidth = eval_bwspec(bw, rate)) == 0)
fprintf(stderr, "interface %s does not know its bandwidth, "
"please specify an absolute bandwidth\n",
pa->ifname);
errors++;
} else if ((pa->ifbandwidth = eval_bwspec(bw, rate)) == 0)
pa->ifbandwidth = rate;
errors += eval_queue_opts(pa, opts, pa->ifbandwidth);

View file

@ -499,7 +499,8 @@ tooshort:
goto ours;
}
if (m->m_flags & M_IP_NEXTHOP) {
if (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL) {
dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL);
if (dchg != 0) {
/*
* Directly ship the packet on. This allows
* forwarding packets originally destined to us