Thomas Gleixner | 2b27bdc | 2019-05-29 16:57:50 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 2 | /* |
| 3 | * File: pn_netlink.c |
| 4 | * |
| 5 | * Phonet netlink interface |
| 6 | * |
| 7 | * Copyright (C) 2008 Nokia Corporation. |
| 8 | * |
Rémi Denis-Courmont | 31fdc55 | 2012-06-13 22:29:03 +0000 | [diff] [blame] | 9 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
| 10 | * Remi Denis-Courmont |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/netlink.h> |
| 15 | #include <linux/phonet.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 16 | #include <linux/slab.h> |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 17 | #include <net/sock.h> |
| 18 | #include <net/phonet/pn_dev.h> |
| 19 | |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 20 | /* Device address handling */ |
| 21 | |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 22 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 23 | u32 portid, u32 seq, int event); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 24 | |
Rémi Denis-Courmont | c7a1a4c | 2009-06-24 01:07:44 +0000 | [diff] [blame] | 25 | void phonet_address_notify(int event, struct net_device *dev, u8 addr) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 26 | { |
| 27 | struct sk_buff *skb; |
| 28 | int err = -ENOBUFS; |
| 29 | |
| 30 | skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct ifaddrmsg)) + |
| 31 | nla_total_size(1), GFP_KERNEL); |
| 32 | if (skb == NULL) |
| 33 | goto errout; |
| 34 | err = fill_addr(skb, dev, addr, 0, 0, event); |
| 35 | if (err < 0) { |
| 36 | WARN_ON(err == -EMSGSIZE); |
| 37 | kfree_skb(skb); |
| 38 | goto errout; |
| 39 | } |
Pablo Neira Ayuso | 1ce85fe | 2009-02-24 23:18:28 -0800 | [diff] [blame] | 40 | rtnl_notify(skb, dev_net(dev), 0, |
| 41 | RTNLGRP_PHONET_IFADDR, NULL, GFP_KERNEL); |
| 42 | return; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 43 | errout: |
Rémi Denis-Courmont | 4b7673a | 2009-11-02 22:41:28 +0000 | [diff] [blame] | 44 | rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_IFADDR, err); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 45 | } |
| 46 | |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 47 | static const struct nla_policy ifa_phonet_policy[IFA_MAX+1] = { |
| 48 | [IFA_LOCAL] = { .type = NLA_U8 }, |
| 49 | }; |
| 50 | |
David Ahern | c21ef3e | 2017-04-16 09:48:24 -0700 | [diff] [blame] | 51 | static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, |
| 52 | struct netlink_ext_ack *extack) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 53 | { |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 54 | struct net *net = sock_net(skb->sk); |
| 55 | struct nlattr *tb[IFA_MAX+1]; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 56 | struct net_device *dev; |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 57 | struct ifaddrmsg *ifm; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 58 | int err; |
| 59 | u8 pnaddr; |
| 60 | |
Eric W. Biederman | 90f62cf | 2014-04-23 14:29:27 -0700 | [diff] [blame] | 61 | if (!netlink_capable(skb, CAP_NET_ADMIN)) |
Eric W. Biederman | dfc47ef | 2012-11-16 03:03:00 +0000 | [diff] [blame] | 62 | return -EPERM; |
| 63 | |
Eric W. Biederman | 90f62cf | 2014-04-23 14:29:27 -0700 | [diff] [blame] | 64 | if (!netlink_capable(skb, CAP_SYS_ADMIN)) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 65 | return -EPERM; |
| 66 | |
| 67 | ASSERT_RTNL(); |
| 68 | |
Johannes Berg | 8cb0817 | 2019-04-26 14:07:28 +0200 | [diff] [blame] | 69 | err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX, |
| 70 | ifa_phonet_policy, extack); |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 71 | if (err < 0) |
| 72 | return err; |
| 73 | |
| 74 | ifm = nlmsg_data(nlh); |
| 75 | if (tb[IFA_LOCAL] == NULL) |
| 76 | return -EINVAL; |
| 77 | pnaddr = nla_get_u8(tb[IFA_LOCAL]); |
| 78 | if (pnaddr & 3) |
| 79 | /* Phonet addresses only have 6 high-order bits */ |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 80 | return -EINVAL; |
| 81 | |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 82 | dev = __dev_get_by_index(net, ifm->ifa_index); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 83 | if (dev == NULL) |
| 84 | return -ENODEV; |
| 85 | |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 86 | if (nlh->nlmsg_type == RTM_NEWADDR) |
| 87 | err = phonet_address_add(dev, pnaddr); |
| 88 | else |
| 89 | err = phonet_address_del(dev, pnaddr); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 90 | if (!err) |
Rémi Denis-Courmont | c7a1a4c | 2009-06-24 01:07:44 +0000 | [diff] [blame] | 91 | phonet_address_notify(nlh->nlmsg_type, dev, pnaddr); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 92 | return err; |
| 93 | } |
| 94 | |
| 95 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 96 | u32 portid, u32 seq, int event) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 97 | { |
| 98 | struct ifaddrmsg *ifm; |
| 99 | struct nlmsghdr *nlh; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 100 | |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 101 | nlh = nlmsg_put(skb, portid, seq, event, sizeof(*ifm), 0); |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 102 | if (nlh == NULL) |
| 103 | return -EMSGSIZE; |
| 104 | |
| 105 | ifm = nlmsg_data(nlh); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 106 | ifm->ifa_family = AF_PHONET; |
| 107 | ifm->ifa_prefixlen = 0; |
| 108 | ifm->ifa_flags = IFA_F_PERMANENT; |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 109 | ifm->ifa_scope = RT_SCOPE_LINK; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 110 | ifm->ifa_index = dev->ifindex; |
David S. Miller | 7f116b5 | 2012-03-29 23:15:10 -0400 | [diff] [blame] | 111 | if (nla_put_u8(skb, IFA_LOCAL, addr)) |
| 112 | goto nla_put_failure; |
Johannes Berg | 053c095 | 2015-01-16 22:09:00 +0100 | [diff] [blame] | 113 | nlmsg_end(skb, nlh); |
| 114 | return 0; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 115 | |
Rémi Denis-Courmont | 8980713 | 2008-09-30 02:51:18 -0700 | [diff] [blame] | 116 | nla_put_failure: |
| 117 | nlmsg_cancel(skb, nlh); |
| 118 | return -EMSGSIZE; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb) |
| 122 | { |
remi.denis-courmont@nokia | 9a3b7a4 | 2009-01-23 03:00:30 +0000 | [diff] [blame] | 123 | struct phonet_device_list *pndevs; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 124 | struct phonet_device *pnd; |
| 125 | int dev_idx = 0, dev_start_idx = cb->args[0]; |
| 126 | int addr_idx = 0, addr_start_idx = cb->args[1]; |
| 127 | |
remi.denis-courmont@nokia | 9a3b7a4 | 2009-01-23 03:00:30 +0000 | [diff] [blame] | 128 | pndevs = phonet_device_list(sock_net(skb->sk)); |
Rémi Denis-Courmont | eeb74a9d | 2009-11-18 10:08:26 -0800 | [diff] [blame] | 129 | rcu_read_lock(); |
| 130 | list_for_each_entry_rcu(pnd, &pndevs->list, list) { |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 131 | u8 addr; |
| 132 | |
| 133 | if (dev_idx > dev_start_idx) |
| 134 | addr_start_idx = 0; |
| 135 | if (dev_idx++ < dev_start_idx) |
| 136 | continue; |
| 137 | |
| 138 | addr_idx = 0; |
Akinobu Mita | a1ca14a | 2010-03-11 12:07:49 +0000 | [diff] [blame] | 139 | for_each_set_bit(addr, pnd->addrs, 64) { |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 140 | if (addr_idx++ < addr_start_idx) |
| 141 | continue; |
| 142 | |
| 143 | if (fill_addr(skb, pnd->netdev, addr << 2, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 144 | NETLINK_CB(cb->skb).portid, |
Rémi Denis-Courmont | 998ec75 | 2009-09-08 23:59:51 +0000 | [diff] [blame] | 145 | cb->nlh->nlmsg_seq, RTM_NEWADDR) < 0) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 146 | goto out; |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | out: |
Rémi Denis-Courmont | eeb74a9d | 2009-11-18 10:08:26 -0800 | [diff] [blame] | 151 | rcu_read_unlock(); |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 152 | cb->args[0] = dev_idx; |
| 153 | cb->args[1] = addr_idx; |
| 154 | |
| 155 | return skb->len; |
| 156 | } |
| 157 | |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 158 | /* Routes handling */ |
| 159 | |
| 160 | static int fill_route(struct sk_buff *skb, struct net_device *dev, u8 dst, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 161 | u32 portid, u32 seq, int event) |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 162 | { |
| 163 | struct rtmsg *rtm; |
| 164 | struct nlmsghdr *nlh; |
| 165 | |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 166 | nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), 0); |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 167 | if (nlh == NULL) |
| 168 | return -EMSGSIZE; |
| 169 | |
| 170 | rtm = nlmsg_data(nlh); |
| 171 | rtm->rtm_family = AF_PHONET; |
| 172 | rtm->rtm_dst_len = 6; |
| 173 | rtm->rtm_src_len = 0; |
| 174 | rtm->rtm_tos = 0; |
| 175 | rtm->rtm_table = RT_TABLE_MAIN; |
| 176 | rtm->rtm_protocol = RTPROT_STATIC; |
| 177 | rtm->rtm_scope = RT_SCOPE_UNIVERSE; |
| 178 | rtm->rtm_type = RTN_UNICAST; |
| 179 | rtm->rtm_flags = 0; |
David S. Miller | 7f116b5 | 2012-03-29 23:15:10 -0400 | [diff] [blame] | 180 | if (nla_put_u8(skb, RTA_DST, dst) || |
| 181 | nla_put_u32(skb, RTA_OIF, dev->ifindex)) |
| 182 | goto nla_put_failure; |
Johannes Berg | 053c095 | 2015-01-16 22:09:00 +0100 | [diff] [blame] | 183 | nlmsg_end(skb, nlh); |
| 184 | return 0; |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 185 | |
| 186 | nla_put_failure: |
| 187 | nlmsg_cancel(skb, nlh); |
| 188 | return -EMSGSIZE; |
| 189 | } |
| 190 | |
| 191 | void rtm_phonet_notify(int event, struct net_device *dev, u8 dst) |
| 192 | { |
| 193 | struct sk_buff *skb; |
| 194 | int err = -ENOBUFS; |
| 195 | |
| 196 | skb = nlmsg_new(NLMSG_ALIGN(sizeof(struct ifaddrmsg)) + |
| 197 | nla_total_size(1) + nla_total_size(4), GFP_KERNEL); |
| 198 | if (skb == NULL) |
| 199 | goto errout; |
| 200 | err = fill_route(skb, dev, dst, 0, 0, event); |
| 201 | if (err < 0) { |
| 202 | WARN_ON(err == -EMSGSIZE); |
| 203 | kfree_skb(skb); |
| 204 | goto errout; |
| 205 | } |
| 206 | rtnl_notify(skb, dev_net(dev), 0, |
| 207 | RTNLGRP_PHONET_ROUTE, NULL, GFP_KERNEL); |
| 208 | return; |
| 209 | errout: |
Rémi Denis-Courmont | 4b7673a | 2009-11-02 22:41:28 +0000 | [diff] [blame] | 210 | rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_ROUTE, err); |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | static const struct nla_policy rtm_phonet_policy[RTA_MAX+1] = { |
| 214 | [RTA_DST] = { .type = NLA_U8 }, |
| 215 | [RTA_OIF] = { .type = NLA_U32 }, |
| 216 | }; |
| 217 | |
David Ahern | c21ef3e | 2017-04-16 09:48:24 -0700 | [diff] [blame] | 218 | static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh, |
| 219 | struct netlink_ext_ack *extack) |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 220 | { |
| 221 | struct net *net = sock_net(skb->sk); |
| 222 | struct nlattr *tb[RTA_MAX+1]; |
| 223 | struct net_device *dev; |
| 224 | struct rtmsg *rtm; |
| 225 | int err; |
| 226 | u8 dst; |
| 227 | |
Eric W. Biederman | 90f62cf | 2014-04-23 14:29:27 -0700 | [diff] [blame] | 228 | if (!netlink_capable(skb, CAP_NET_ADMIN)) |
Eric W. Biederman | dfc47ef | 2012-11-16 03:03:00 +0000 | [diff] [blame] | 229 | return -EPERM; |
| 230 | |
Eric W. Biederman | 90f62cf | 2014-04-23 14:29:27 -0700 | [diff] [blame] | 231 | if (!netlink_capable(skb, CAP_SYS_ADMIN)) |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 232 | return -EPERM; |
| 233 | |
| 234 | ASSERT_RTNL(); |
| 235 | |
Johannes Berg | 8cb0817 | 2019-04-26 14:07:28 +0200 | [diff] [blame] | 236 | err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, |
| 237 | rtm_phonet_policy, extack); |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 238 | if (err < 0) |
| 239 | return err; |
| 240 | |
| 241 | rtm = nlmsg_data(nlh); |
| 242 | if (rtm->rtm_table != RT_TABLE_MAIN || rtm->rtm_type != RTN_UNICAST) |
| 243 | return -EINVAL; |
| 244 | if (tb[RTA_DST] == NULL || tb[RTA_OIF] == NULL) |
| 245 | return -EINVAL; |
| 246 | dst = nla_get_u8(tb[RTA_DST]); |
| 247 | if (dst & 3) /* Phonet addresses only have 6 high-order bits */ |
| 248 | return -EINVAL; |
| 249 | |
| 250 | dev = __dev_get_by_index(net, nla_get_u32(tb[RTA_OIF])); |
| 251 | if (dev == NULL) |
| 252 | return -ENODEV; |
| 253 | |
| 254 | if (nlh->nlmsg_type == RTM_NEWROUTE) |
| 255 | err = phonet_route_add(dev, dst); |
| 256 | else |
| 257 | err = phonet_route_del(dev, dst); |
| 258 | if (!err) |
| 259 | rtm_phonet_notify(nlh->nlmsg_type, dev, dst); |
| 260 | return err; |
| 261 | } |
| 262 | |
| 263 | static int route_dumpit(struct sk_buff *skb, struct netlink_callback *cb) |
| 264 | { |
| 265 | struct net *net = sock_net(skb->sk); |
Johannes Berg | 926e987 | 2015-01-19 12:15:24 +0100 | [diff] [blame] | 266 | u8 addr; |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 267 | |
Eric Dumazet | e67f88d | 2011-04-27 22:56:07 +0000 | [diff] [blame] | 268 | rcu_read_lock(); |
Johannes Berg | 926e987 | 2015-01-19 12:15:24 +0100 | [diff] [blame] | 269 | for (addr = cb->args[0]; addr < 64; addr++) { |
| 270 | struct net_device *dev = phonet_route_get_rcu(net, addr << 2); |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 271 | |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 272 | if (!dev) |
| 273 | continue; |
| 274 | |
Johannes Berg | 926e987 | 2015-01-19 12:15:24 +0100 | [diff] [blame] | 275 | if (fill_route(skb, dev, addr << 2, NETLINK_CB(cb->skb).portid, |
| 276 | cb->nlh->nlmsg_seq, RTM_NEWROUTE) < 0) |
| 277 | goto out; |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | out: |
Eric Dumazet | e67f88d | 2011-04-27 22:56:07 +0000 | [diff] [blame] | 281 | rcu_read_unlock(); |
Johannes Berg | 926e987 | 2015-01-19 12:15:24 +0100 | [diff] [blame] | 282 | cb->args[0] = addr; |
Rémi Denis-Courmont | f062f41 | 2009-10-14 00:48:29 +0000 | [diff] [blame] | 283 | |
| 284 | return skb->len; |
| 285 | } |
| 286 | |
remi.denis-courmont@nokia | 660f706 | 2009-01-23 03:00:28 +0000 | [diff] [blame] | 287 | int __init phonet_netlink_register(void) |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 288 | { |
Florian Westphal | c1c502b | 2017-12-02 21:44:07 +0100 | [diff] [blame] | 289 | int err = rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_NEWADDR, |
| 290 | addr_doit, NULL, 0); |
remi.denis-courmont@nokia | 660f706 | 2009-01-23 03:00:28 +0000 | [diff] [blame] | 291 | if (err) |
| 292 | return err; |
| 293 | |
Florian Westphal | c1c502b | 2017-12-02 21:44:07 +0100 | [diff] [blame] | 294 | /* Further rtnl_register_module() cannot fail */ |
| 295 | rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_DELADDR, |
| 296 | addr_doit, NULL, 0); |
| 297 | rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_GETADDR, |
| 298 | NULL, getaddr_dumpit, 0); |
| 299 | rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_NEWROUTE, |
| 300 | route_doit, NULL, 0); |
| 301 | rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_DELROUTE, |
| 302 | route_doit, NULL, 0); |
| 303 | rtnl_register_module(THIS_MODULE, PF_PHONET, RTM_GETROUTE, |
| 304 | NULL, route_dumpit, 0); |
remi.denis-courmont@nokia | 660f706 | 2009-01-23 03:00:28 +0000 | [diff] [blame] | 305 | return 0; |
Remi Denis-Courmont | 8fb3974 | 2008-09-22 20:04:30 -0700 | [diff] [blame] | 306 | } |