diff options
Diffstat (limited to 'sbin/ipsec/ipsecadm/xf_espdesmd5.c')
-rw-r--r-- | sbin/ipsec/ipsecadm/xf_espdesmd5.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sbin/ipsec/ipsecadm/xf_espdesmd5.c b/sbin/ipsec/ipsecadm/xf_espdesmd5.c index 713722d156f..b1ad60bddb9 100644 --- a/sbin/ipsec/ipsecadm/xf_espdesmd5.c +++ b/sbin/ipsec/ipsecadm/xf_espdesmd5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xf_espdesmd5.c,v 1.3 1997/07/01 22:18:07 provos Exp $ */ +/* $OpenBSD: xf_espdesmd5.c,v 1.4 1997/07/11 23:50:24 provos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, * (except when noted otherwise). @@ -63,7 +63,7 @@ char **argv; int i; struct encap_msghdr *em; - struct espdesmd5_xencap *xd; + struct esp_new_xencap *xd; if (argc != 6) { fprintf(stderr, "usage: %s src dst spi iv key\n", argv[0]); @@ -72,22 +72,23 @@ char **argv; em = (struct encap_msghdr *)&buf[0]; - em->em_msglen = EMT_SETSPI_FLEN + ESPDESMD5_ULENGTH; + em->em_msglen = EMT_SETSPI_FLEN + ESP_NEW_XENCAP_LEN; em->em_version = PFENCAP_VERSION_1; em->em_type = EMT_SETSPI; em->em_spi = htonl(strtoul(argv[3], NULL, 16)); em->em_src.s_addr = inet_addr(argv[1]); em->em_dst.s_addr = inet_addr(argv[2]); - em->em_alg = XF_ESPDESMD5; - xd = (struct espdesmd5_xencap *)(em->em_dat); + em->em_alg = XF_NEW_ESP; + em->em_sproto = IPPROTO_ESP; + + xd = (struct esp_new_xencap *)(em->em_dat); xd->edx_ivlen = 0; - xd->edx_initiator = 1; - xd->edx_wnd = 32; xd->edx_keylen = 8; + xd->edx_wnd = 32; for (i = 0; i < 8; i++) - xd->edx_key[i] = x2i(&(argv[5][2*i])); + xd->edx_data[i] = x2i(&(argv[5][2*i])); return xf_set(em); } |