aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-11 12:30:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-11 12:30:02 +0000
commitcc06ca4c97e7bd101fba965c5de74d9c242964f6 (patch)
tree4b322b5306fd7cdaeaf75945e5d94cb2587e322f /net
parent10e1b75961fcd4165a76d04bdcc5065aac1175f1 (diff)
parent9c7ffe266485c87e8e76d59af22e96866c202e42 (diff)
downloadqemu-cc06ca4c97e7bd101fba965c5de74d9c242964f6.zip
qemu-cc06ca4c97e7bd101fba965c5de74d9c242964f6.tar.gz
qemu-cc06ca4c97e7bd101fba965c5de74d9c242964f6.tar.bz2
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Mon 11 Jan 2016 05:22:16 GMT using RSA key ID 398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: (24 commits) ether/slirp: Avoid redefinition of the same constants l2tpv3: fix cookie decoding net: ne2000: fix bounds check in ioport operations net: rocker: fix an incorrect array bounds check vmxnet3: Introduce 'x-disable-pcie' back-compat property vmxnet3: Report the Device Serial Number capability vmxnet3: The vmxnet3 device is a PCIE endpoint vmxnet3: coding: Introduce VMXNET3Class vmxnet3: Introduce 'x-old-msi-offsets' back-compat property vmxnet3: Change the offset of the MSIX PBA table vmxnet3: Change offsets of msi/msix pci capabilities net/filter: fix nf->netdev_id leak net/dump: fix nfds->filename leak net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION net/vmxnet3: return 0 on unknown command net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command net/vmxnet3: return 1 on device activation failure MAINTAINERS: Add an entry for the net/slirp.c file net: vmxnet3: avoid memory leakage in activate_device ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'net')
-rw-r--r--net/dump.c8
-rw-r--r--net/filter.c1
-rw-r--r--net/l2tpv3.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/net/dump.c b/net/dump.c
index ce16a4b..347b5ca 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -329,6 +329,13 @@ static void filter_dump_instance_init(Object *obj)
file_dump_set_filename, NULL);
}
+static void filter_dump_instance_finalize(Object *obj)
+{
+ NetFilterDumpState *nfds = FILTER_DUMP(obj);
+
+ g_free(nfds->filename);
+}
+
static void filter_dump_class_init(ObjectClass *oc, void *data)
{
NetFilterClass *nfc = NETFILTER_CLASS(oc);
@@ -343,6 +350,7 @@ static const TypeInfo filter_dump_info = {
.parent = TYPE_NETFILTER,
.class_init = filter_dump_class_init,
.instance_init = filter_dump_instance_init,
+ .instance_finalize = filter_dump_instance_finalize,
.instance_size = sizeof(NetFilterDumpState),
};
diff --git a/net/filter.c b/net/filter.c
index 1365bad..f777ba2 100644
--- a/net/filter.c
+++ b/net/filter.c
@@ -204,6 +204,7 @@ static void netfilter_finalize(Object *obj)
if (nf->netdev && !QTAILQ_EMPTY(&nf->netdev->filters)) {
QTAILQ_REMOVE(&nf->netdev->filters, nf, next);
}
+ g_free(nf->netdev_id);
}
static void netfilter_class_init(ObjectClass *oc, void *data)
diff --git a/net/l2tpv3.c b/net/l2tpv3.c
index 8e68e54..21d6119 100644
--- a/net/l2tpv3.c
+++ b/net/l2tpv3.c
@@ -325,7 +325,7 @@ static int l2tpv3_verify_header(NetL2TPV3State *s, uint8_t *buf)
if (s->cookie_is_64) {
cookie = ldq_be_p(buf + s->cookie_offset);
} else {
- cookie = ldl_be_p(buf + s->cookie_offset);
+ cookie = ldl_be_p(buf + s->cookie_offset) & 0xffffffffULL;
}
if (cookie != s->rx_cookie) {
if (!s->header_mismatch) {