
392 Chapter 4—DHCPv6
Validation
Listing 4-84
dhcp6s.c
954 static int
955 process_relayforw(dh6p, optendp, relayinfohead, from)
956 struct dhcp6 **dh6p;
957 struct dhcp6opt **optendp;
958 struct relayinfolist *relayinfohead;
959 struct sockaddr *from;
960 {
961 struct dhcp6_relay *dh6relay = (struct dhcp6_relay *)*dh6p;
962 struct dhcp6opt *optend = *optendp;
963 struct relayinfo *relayinfo;
964 struct dhcp6_optinfo optinfo;
965 int len;
966
967 again:
968 len = (void *)optend - (void *)dh6relay;
969 if (len < sizeof (*dh6relay)) {
970 dprintf(LOG_INFO, FNAME, "short relay message from %s",
971 addr2str(from));
972 return (-1);
973 }
974 dprintf(LOG_DEBUG, FNAME,
975 ...