.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * DECnet An implementation of the DECnet protocol suite for the LINUX |
---|
3 | 4 | * operating system. DECnet is implemented using the BSD Socket |
---|
.. | .. |
---|
44 | 45 | /****************************************************************************** |
---|
45 | 46 | (c) 1995-1998 E.M. Serrat emserrat@geocities.com |
---|
46 | 47 | |
---|
47 | | - This program is free software; you can redistribute it and/or modify |
---|
48 | | - it under the terms of the GNU General Public License as published by |
---|
49 | | - the Free Software Foundation; either version 2 of the License, or |
---|
50 | | - any later version. |
---|
51 | | - |
---|
52 | | - This program is distributed in the hope that it will be useful, |
---|
53 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
54 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
55 | | - GNU General Public License for more details. |
---|
56 | 48 | *******************************************************************************/ |
---|
57 | 49 | |
---|
58 | 50 | #include <linux/errno.h> |
---|
.. | .. |
---|
502 | 494 | |
---|
503 | 495 | /** |
---|
504 | 496 | * dn_route_rx_packet - Try and find a route for an incoming packet |
---|
| 497 | + * @net: The applicable net namespace |
---|
| 498 | + * @sk: Socket packet transmitted on |
---|
505 | 499 | * @skb: The packet to find a route for |
---|
506 | 500 | * |
---|
507 | 501 | * Returns: result of input function if route is found, error code otherwise |
---|
.. | .. |
---|
678 | 672 | if (decnet_debug_level & 1) |
---|
679 | 673 | printk(KERN_DEBUG |
---|
680 | 674 | "dn_route_rcv: got 0x%02x from %s [%d %d %d]\n", |
---|
681 | | - (int)flags, (dev) ? dev->name : "???", len, skb->len, |
---|
| 675 | + (int)flags, dev->name, len, skb->len, |
---|
682 | 676 | padlen); |
---|
683 | 677 | |
---|
684 | 678 | if (flags & DN_RT_PKT_CNTL) { |
---|
.. | .. |
---|
1181 | 1175 | if (dev_out->flags & IFF_LOOPBACK) |
---|
1182 | 1176 | flags |= RTCF_LOCAL; |
---|
1183 | 1177 | |
---|
1184 | | - rt = dst_alloc(&dn_dst_ops, dev_out, 0, DST_OBSOLETE_NONE, DST_HOST); |
---|
| 1178 | + rt = dst_alloc(&dn_dst_ops, dev_out, 0, DST_OBSOLETE_NONE, 0); |
---|
1185 | 1179 | if (rt == NULL) |
---|
1186 | 1180 | goto e_nobufs; |
---|
1187 | 1181 | |
---|
.. | .. |
---|
1447 | 1441 | } |
---|
1448 | 1442 | |
---|
1449 | 1443 | make_route: |
---|
1450 | | - rt = dst_alloc(&dn_dst_ops, out_dev, 1, DST_OBSOLETE_NONE, DST_HOST); |
---|
| 1444 | + rt = dst_alloc(&dn_dst_ops, out_dev, 1, DST_OBSOLETE_NONE, 0); |
---|
1451 | 1445 | if (rt == NULL) |
---|
1452 | 1446 | goto e_nobufs; |
---|
1453 | 1447 | |
---|
.. | .. |
---|
1653 | 1647 | if (!net_eq(net, &init_net)) |
---|
1654 | 1648 | return -EINVAL; |
---|
1655 | 1649 | |
---|
1656 | | - err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_dn_policy, |
---|
1657 | | - extack); |
---|
| 1650 | + err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, |
---|
| 1651 | + rtm_dn_policy, extack); |
---|
1658 | 1652 | if (err < 0) |
---|
1659 | 1653 | return err; |
---|
1660 | 1654 | |
---|
.. | .. |
---|
1868 | 1862 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; |
---|
1869 | 1863 | add_timer(&dn_route_timer); |
---|
1870 | 1864 | |
---|
1871 | | - goal = totalram_pages >> (26 - PAGE_SHIFT); |
---|
| 1865 | + goal = totalram_pages() >> (26 - PAGE_SHIFT); |
---|
1872 | 1866 | |
---|
1873 | 1867 | for(order = 0; (1UL << order) < goal; order++) |
---|
1874 | 1868 | /* NOTHING */; |
---|