fixed CHILD_SA SPI byte order in XML interface
authorMartin Willi <martin@strongswan.org>
Fri, 28 Sep 2007 07:05:15 +0000 (07:05 -0000)
committerMartin Willi <martin@strongswan.org>
Fri, 28 Sep 2007 07:05:15 +0000 (07:05 -0000)
src/charon/control/interfaces/xml_interface.c

index 0ca9e92..fdb8e1c 100644 (file)
@@ -154,7 +154,7 @@ static void write_childend(xmlTextWriterPtr writer, child_sa_t *child, bool loca
        linked_list_t *list;
        traffic_selector_t *ts;
        xmlTextWriterWriteFormatElement(writer, "spi", "%lx", 
-                                                                       child->get_spi(child, local));
+                                                                       htonl(child->get_spi(child, local)));
        xmlTextWriterStartElement(writer, "networks");
        list = child->get_traffic_selectors(child, local);
        iterator = list->create_iterator(list, TRUE);