Fix payload length of id_payload created from a traffic selector
authorMartin Willi <martin@revosec.ch>
Mon, 21 Nov 2011 12:43:48 +0000 (13:43 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:30:46 +0000 (17:30 +0100)
src/libcharon/encoding/payloads/id_payload.c

index dec08de..317cbd6 100644 (file)
@@ -406,6 +406,7 @@ id_payload_t *id_payload_create_from_ts(traffic_selector_t *ts)
        }
        this->port = ts->get_from_port(ts);
        this->protocol_id = ts->get_protocol(ts);
+       this->payload_length += this->id_data.len;
 
        net->destroy(net);