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