| 743 | } |
| 744 | |
| 745 | static int |
| 746 | ff_veth_set_gateway6(struct ff_veth_softc *sc, uint32_t fib_num) |
| 747 | { |
| 748 | struct sockaddr_in6 gw, dst, nm;; |
| 749 | struct rt_addrinfo info; |
| 750 | struct rib_cmd_info rci; |
| 751 | |
| 752 | bzero((caddr_t)&info, sizeof(info)); |
| 753 | info.rti_flags = RTF_GATEWAY; |
| 754 | |
| 755 | bzero(&gw, sizeof(gw)); |
| 756 | bzero(&dst, sizeof(dst)); |
| 757 | bzero(&nm, sizeof(nm)); |
| 758 | |
| 759 | gw.sin6_len = dst.sin6_len = nm.sin6_len = sizeof(struct sockaddr_in6); |
| 760 | gw.sin6_family = dst.sin6_family = nm.sin6_family = AF_INET6; |
| 761 | |
| 762 | gw.sin6_addr = sc->gateway6; |
| 763 | //dst.sin6_addr = nm.sin6_addr = 0; |
| 764 | |
| 765 | info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&gw; |
| 766 | info.rti_info[RTAX_DST] = (struct sockaddr *)&dst; |
| 767 | info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&nm; |
| 768 | |
| 769 | return rib_action(fib_num, RTM_ADD, &info, &rci); |
| 770 | } |
| 771 | |
| 772 | static int |
| 773 | ff_veth_setvaddr6(struct ff_veth_softc *sc, struct ff_port_cfg *cfg, const char *if_name) |
no test coverage detected