|
|
e84ee2 |
diff -Naur libreswan-3.32-orig/lib/libipsecconf/interfaces.c libreswan-3.32/lib/libipsecconf/interfaces.c
|
|
|
e84ee2 |
--- libreswan-3.32-orig/lib/libipsecconf/interfaces.c 2020-05-11 10:13:41.000000000 -0400
|
|
|
e84ee2 |
+++ libreswan-3.32/lib/libipsecconf/interfaces.c 2020-06-04 18:51:39.508280352 -0400
|
|
|
e84ee2 |
@@ -71,7 +71,11 @@
|
|
|
e84ee2 |
if (sa->sa.sa_family == af) {
|
|
|
e84ee2 |
/* XXX: sizeof right? */
|
|
|
e84ee2 |
ip_endpoint nhe;
|
|
|
e84ee2 |
- happy(sockaddr_to_endpoint(sa, sizeof(*sa), &nhe));
|
|
|
e84ee2 |
+ err_t e = sockaddr_to_endpoint(sa, sizeof(*sa), &nhe;;
|
|
|
e84ee2 |
+ if (e != NULL) {
|
|
|
e84ee2 |
+ pexpect(e != NULL);
|
|
|
e84ee2 |
+ return false;
|
|
|
e84ee2 |
+ }
|
|
|
e84ee2 |
pexpect(endpoint_hport(&nhe) == 0);
|
|
|
e84ee2 |
*nh = endpoint_address(&nhe;;
|
|
|
e84ee2 |
}
|
|
|
e84ee2 |
@@ -84,7 +88,11 @@
|
|
|
e84ee2 |
if (sa->sa.sa_family == af) {
|
|
|
e84ee2 |
/* XXX: sizeof right? */
|
|
|
e84ee2 |
ip_endpoint dste;
|
|
|
e84ee2 |
- happy(sockaddr_to_endpoint(sa, sizeof(*sa), &dste));
|
|
|
e84ee2 |
+ err_t e = sockaddr_to_endpoint(sa, sizeof(*sa), &dste;;
|
|
|
e84ee2 |
+ if (e != NULL) {
|
|
|
e84ee2 |
+ pexpect(e != NULL);
|
|
|
e84ee2 |
+ return false;
|
|
|
e84ee2 |
+ }
|
|
|
e84ee2 |
pexpect(endpoint_hport(&dste) == 0);
|
|
|
e84ee2 |
*dst = endpoint_address(&dste;;
|
|
|
e84ee2 |
}
|
|
|
e84ee2 |
diff -Naur libreswan-3.32-orig/lib/libswan/ip_endpoint.c libreswan-3.32/lib/libswan/ip_endpoint.c
|
|
|
e84ee2 |
--- libreswan-3.32-orig/lib/libswan/ip_endpoint.c 2020-05-11 10:13:41.000000000 -0400
|
|
|
e84ee2 |
+++ libreswan-3.32/lib/libswan/ip_endpoint.c 2020-06-04 18:51:39.508280352 -0400
|
|
|
e84ee2 |
@@ -54,20 +54,12 @@
|
|
|
e84ee2 |
switch (sa->sa.sa_family) {
|
|
|
e84ee2 |
case AF_INET:
|
|
|
e84ee2 |
{
|
|
|
e84ee2 |
- /* XXX: to strict? */
|
|
|
e84ee2 |
- if (sa_len != sizeof(sa->sin)) {
|
|
|
e84ee2 |
- return "wrong length";
|
|
|
e84ee2 |
- }
|
|
|
e84ee2 |
address = address_from_in_addr(&sa->sin.sin_addr);
|
|
|
e84ee2 |
port = ntohs(sa->sin.sin_port);
|
|
|
e84ee2 |
break;
|
|
|
e84ee2 |
}
|
|
|
e84ee2 |
case AF_INET6:
|
|
|
e84ee2 |
{
|
|
|
e84ee2 |
- /* XXX: to strict? */
|
|
|
e84ee2 |
- if (sa_len != sizeof(sa->sin6)) {
|
|
|
e84ee2 |
- return "wrong length";
|
|
|
e84ee2 |
- }
|
|
|
e84ee2 |
address = address_from_in6_addr(&sa->sin6.sin6_addr);
|
|
|
e84ee2 |
port = ntohs(sa->sin6.sin6_port);
|
|
|
e84ee2 |
break;
|